Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic PR of restapi_auto_ro-joowan_account-refactor into master #1889

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.accounts_operations import AccountsOperations
from .operations.data_lake_store_accounts_operations import DataLakeStoreAccountsOperations
from .operations.storage_accounts_operations import StorageAccountsOperations
from .operations.compute_policies_operations import ComputePoliciesOperations
from .operations.firewall_rules_operations import FirewallRulesOperations
from .operations.storage_accounts_operations import StorageAccountsOperations
from .operations.data_lake_store_accounts_operations import DataLakeStoreAccountsOperations
from .operations.account_operations import AccountOperations
from .operations.locations_operations import LocationsOperations
from .operations.operations import Operations
from .operations.locations_operations import LocationsOperations
from . import models


Expand All @@ -35,16 +35,24 @@ class DataLakeAnalyticsAccountManagementClientConfiguration(AzureConfiguration):
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:type subscription_id: str
:param resource_group_name: The name of the Azure resource group.
:type resource_group_name: str
:param account_name: The name of the Data Lake Analytics account.
:type account_name: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, resource_group_name, account_name, base_url=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ro-joowan This means your Swagger is incorrect and defines an incorrect parameter-location

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@ro-joowan ro-joowan Feb 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmazuel Correct. I fixed this in a PR that came right after this one: Azure/azure-rest-api-specs#2417


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 resource_group_name is None:
raise ValueError("Parameter 'resource_group_name' must not be None.")
if account_name is None:
raise ValueError("Parameter 'account_name' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -55,6 +63,8 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.resource_group_name = resource_group_name
self.account_name = account_name


class DataLakeAnalyticsAccountManagementClient(object):
Expand All @@ -63,20 +73,20 @@ class DataLakeAnalyticsAccountManagementClient(object):
:ivar config: Configuration for client.
:vartype config: DataLakeAnalyticsAccountManagementClientConfiguration

:ivar accounts: Accounts operations
:vartype accounts: azure.mgmt.datalake.analytics.account.operations.AccountsOperations
:ivar data_lake_store_accounts: DataLakeStoreAccounts operations
:vartype data_lake_store_accounts: azure.mgmt.datalake.analytics.account.operations.DataLakeStoreAccountsOperations
:ivar storage_accounts: StorageAccounts operations
:vartype storage_accounts: azure.mgmt.datalake.analytics.account.operations.StorageAccountsOperations
:ivar compute_policies: ComputePolicies operations
:vartype compute_policies: azure.mgmt.datalake.analytics.account.operations.ComputePoliciesOperations
:ivar firewall_rules: FirewallRules operations
:vartype firewall_rules: azure.mgmt.datalake.analytics.account.operations.FirewallRulesOperations
:ivar storage_accounts: StorageAccounts operations
:vartype storage_accounts: azure.mgmt.datalake.analytics.account.operations.StorageAccountsOperations
:ivar data_lake_store_accounts: DataLakeStoreAccounts operations
:vartype data_lake_store_accounts: azure.mgmt.datalake.analytics.account.operations.DataLakeStoreAccountsOperations
:ivar account: Account operations
:vartype account: azure.mgmt.datalake.analytics.account.operations.AccountOperations
:ivar locations: Locations operations
:vartype locations: azure.mgmt.datalake.analytics.account.operations.LocationsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.datalake.analytics.account.operations.Operations
:ivar locations: Locations operations
:vartype locations: azure.mgmt.datalake.analytics.account.operations.LocationsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -85,31 +95,35 @@ class DataLakeAnalyticsAccountManagementClient(object):
identify Microsoft Azure subscription. The subscription ID forms part of
the URI for every service call.
:type subscription_id: str
:param resource_group_name: The name of the Azure resource group.
:type resource_group_name: str
:param account_name: The name of the Data Lake Analytics account.
:type account_name: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, resource_group_name, account_name, base_url=None):

self.config = DataLakeAnalyticsAccountManagementClientConfiguration(credentials, subscription_id, base_url)
self.config = DataLakeAnalyticsAccountManagementClientConfiguration(credentials, subscription_id, resource_group_name, account_name, 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 = '2016-11-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.compute_policies = ComputePoliciesOperations(
self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.firewall_rules = FirewallRulesOperations(
self.data_lake_store_accounts = DataLakeStoreAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.storage_accounts = StorageAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.data_lake_store_accounts = DataLakeStoreAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.account = AccountOperations(
self.compute_policies = ComputePoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.locations = LocationsOperations(
self.firewall_rules = FirewallRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.locations = LocationsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -9,88 +9,104 @@
# regenerated.
# --------------------------------------------------------------------------

from .storage_account_info import StorageAccountInfo
from .storage_container import StorageContainer
from .sas_token_info import SasTokenInfo
from .data_lake_store_account_info import DataLakeStoreAccountInfo
from .firewall_rule import FirewallRule
from .compute_policy_account_create_parameters import ComputePolicyAccountCreateParameters
from .resource import Resource
from .sub_resource import SubResource
from .data_lake_store_account_information import DataLakeStoreAccountInformation
from .storage_account_information import StorageAccountInformation
from .compute_policy import ComputePolicy
from .firewall_rule import FirewallRule
from .data_lake_analytics_account import DataLakeAnalyticsAccount
from .data_lake_analytics_account_basic import DataLakeAnalyticsAccountBasic
from .storage_container import StorageContainer
from .sas_token_information import SasTokenInformation
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .capability_information import CapabilityInformation
from .name_availability_information import NameAvailabilityInformation
from .add_data_lake_store_with_account_parameters import AddDataLakeStoreWithAccountParameters
from .add_storage_account_with_account_parameters import AddStorageAccountWithAccountParameters
from .create_compute_policy_with_account_parameters import CreateComputePolicyWithAccountParameters
from .create_firewall_rule_with_account_parameters import CreateFirewallRuleWithAccountParameters
from .create_data_lake_analytics_account_parameters import CreateDataLakeAnalyticsAccountParameters
from .update_data_lake_store_with_account_parameters import UpdateDataLakeStoreWithAccountParameters
from .update_storage_account_with_account_parameters import UpdateStorageAccountWithAccountParameters
from .update_compute_policy_with_account_parameters import UpdateComputePolicyWithAccountParameters
from .update_firewall_rule_with_account_parameters import UpdateFirewallRuleWithAccountParameters
from .update_data_lake_analytics_account_parameters import UpdateDataLakeAnalyticsAccountParameters
from .add_data_lake_store_parameters import AddDataLakeStoreParameters
from .add_storage_account_parameters import AddStorageAccountParameters
from .update_storage_account_parameters import UpdateStorageAccountParameters
from .compute_policy_create_or_update_parameters import ComputePolicyCreateOrUpdateParameters
from .data_lake_analytics_account_update_parameters import DataLakeAnalyticsAccountUpdateParameters
from .data_lake_analytics_account_properties_basic import DataLakeAnalyticsAccountPropertiesBasic
from .data_lake_analytics_account_basic import DataLakeAnalyticsAccountBasic
from .data_lake_analytics_account import DataLakeAnalyticsAccount
from .create_or_update_compute_policy_parameters import CreateOrUpdateComputePolicyParameters
from .update_compute_policy_parameters import UpdateComputePolicyParameters
from .create_or_update_firewall_rule_parameters import CreateOrUpdateFirewallRuleParameters
from .update_firewall_rule_parameters import UpdateFirewallRuleParameters
from .name_availability_information import NameAvailabilityInformation
from .check_name_availability_parameters import CheckNameAvailabilityParameters
from .capability_information import CapabilityInformation
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .resource import Resource
from .optional_sub_resource import OptionalSubResource
from .sub_resource import SubResource
from .data_lake_analytics_account_basic_paged import DataLakeAnalyticsAccountBasicPaged
from .data_lake_store_account_information_paged import DataLakeStoreAccountInformationPaged
from .storage_account_information_paged import StorageAccountInformationPaged
from .storage_container_paged import StorageContainerPaged
from .sas_token_information_paged import SasTokenInformationPaged
from .compute_policy_paged import ComputePolicyPaged
from .firewall_rule_paged import FirewallRulePaged
from .storage_container_paged import StorageContainerPaged
from .sas_token_info_paged import SasTokenInfoPaged
from .storage_account_info_paged import StorageAccountInfoPaged
from .data_lake_store_account_info_paged import DataLakeStoreAccountInfoPaged
from .data_lake_analytics_account_basic_paged import DataLakeAnalyticsAccountBasicPaged
from .data_lake_analytics_account_management_client_enums import (
TierType,
AADObjectType,
FirewallState,
FirewallAllowAzureIpsState,
AADObjectType,
TierType,
DataLakeAnalyticsAccountStatus,
DataLakeAnalyticsAccountState,
SubscriptionState,
OperationOrigin,
SubscriptionState,
)

__all__ = [
'StorageAccountInfo',
'StorageContainer',
'SasTokenInfo',
'DataLakeStoreAccountInfo',
'FirewallRule',
'ComputePolicyAccountCreateParameters',
'Resource',
'SubResource',
'DataLakeStoreAccountInformation',
'StorageAccountInformation',
'ComputePolicy',
'FirewallRule',
'DataLakeAnalyticsAccount',
'DataLakeAnalyticsAccountBasic',
'StorageContainer',
'SasTokenInformation',
'OperationDisplay',
'Operation',
'OperationListResult',
'CapabilityInformation',
'NameAvailabilityInformation',
'AddDataLakeStoreWithAccountParameters',
'AddStorageAccountWithAccountParameters',
'CreateComputePolicyWithAccountParameters',
'CreateFirewallRuleWithAccountParameters',
'CreateDataLakeAnalyticsAccountParameters',
'UpdateDataLakeStoreWithAccountParameters',
'UpdateStorageAccountWithAccountParameters',
'UpdateComputePolicyWithAccountParameters',
'UpdateFirewallRuleWithAccountParameters',
'UpdateDataLakeAnalyticsAccountParameters',
'AddDataLakeStoreParameters',
'AddStorageAccountParameters',
'UpdateStorageAccountParameters',
'ComputePolicyCreateOrUpdateParameters',
'DataLakeAnalyticsAccountUpdateParameters',
'DataLakeAnalyticsAccountPropertiesBasic',
'DataLakeAnalyticsAccountBasic',
'DataLakeAnalyticsAccount',
'CreateOrUpdateComputePolicyParameters',
'UpdateComputePolicyParameters',
'CreateOrUpdateFirewallRuleParameters',
'UpdateFirewallRuleParameters',
'NameAvailabilityInformation',
'CheckNameAvailabilityParameters',
'CapabilityInformation',
'OperationDisplay',
'Operation',
'OperationListResult',
'Resource',
'OptionalSubResource',
'SubResource',
'DataLakeAnalyticsAccountBasicPaged',
'DataLakeStoreAccountInformationPaged',
'StorageAccountInformationPaged',
'StorageContainerPaged',
'SasTokenInformationPaged',
'ComputePolicyPaged',
'FirewallRulePaged',
'StorageContainerPaged',
'SasTokenInfoPaged',
'StorageAccountInfoPaged',
'DataLakeStoreAccountInfoPaged',
'DataLakeAnalyticsAccountBasicPaged',
'TierType',
'AADObjectType',
'FirewallState',
'FirewallAllowAzureIpsState',
'AADObjectType',
'TierType',
'DataLakeAnalyticsAccountStatus',
'DataLakeAnalyticsAccountState',
'SubscriptionState',
'OperationOrigin',
'SubscriptionState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@


class AddDataLakeStoreParameters(Model):
"""Additional Data Lake Store parameters.
"""The parameters used to add a new Data Lake Store account.

:param suffix: the optional suffix for the Data Lake Store account.
:param suffix: The optional suffix for the Data Lake Store account.
:type suffix: str
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AddDataLakeStoreWithAccountParameters(Model):
"""The parameters used to add a new Data Lake Store account while creating a
new Data Lake Analytics account.

:param name: The unique name of the Data Lake Store account to add.
:type name: str
:param suffix: The optional suffix for the Data Lake Store account.
:type suffix: str
"""

_validation = {
'name': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'suffix': {'key': 'properties.suffix', 'type': 'str'},
}

def __init__(self, name, suffix=None):
super(AddDataLakeStoreWithAccountParameters, self).__init__()
self.name = name
self.suffix = suffix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@


class AddStorageAccountParameters(Model):
"""Storage account parameters for a storage account being added to a Data Lake
Analytics account.
"""The parameters used to add a new Azure Storage account.

:param access_key: the access key associated with this Azure Storage
:param access_key: The access key associated with this Azure Storage
account that will be used to connect to it.
:type access_key: str
:param suffix: the optional suffix for the storage account.
:param suffix: The optional suffix for the storage account.
:type suffix: str
"""

Expand Down
Loading