Skip to content
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
19 changes: 19 additions & 0 deletions sdk/azure-mgmt/softwareplan/__init__.py
Original file line number Diff line number Diff line change
@@ -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 softwareplanClientConfiguration
from ._softwareplan_client import softwareplanClient
__all__ = ['softwareplanClient', 'softwareplanClientConfiguration']

from .version import VERSION

__version__ = VERSION

48 changes: 48 additions & 0 deletions sdk/azure-mgmt/softwareplan/_configuration.py
Original file line number Diff line number Diff line change
@@ -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 softwareplanClientConfiguration(AzureConfiguration):
"""Configuration for softwareplanClient
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<msrestazure.azure_active_directory>`
: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(softwareplanClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('softwareplan/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
64 changes: 64 additions & 0 deletions sdk/azure-mgmt/softwareplan/_softwareplan_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# 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 softwareplanClientConfiguration
from .operations import SoftwarePlanOperations
from .operations import HybridUseBenefitOperations
from .operations import HybridUseBenefitRevisionOperations
from .operations import Operations
from . import models


class softwareplanClient(SDKClient):
"""Azure software plans let users create and manage licenses for various software used in Azure.

:ivar config: Configuration for client.
:vartype config: softwareplanClientConfiguration

:ivar software_plan: SoftwarePlan operations
:vartype software_plan: microsoft.softwareplan.operations.SoftwarePlanOperations
:ivar hybrid_use_benefit: HybridUseBenefit operations
:vartype hybrid_use_benefit: microsoft.softwareplan.operations.HybridUseBenefitOperations
:ivar hybrid_use_benefit_revision: HybridUseBenefitRevision operations
:vartype hybrid_use_benefit_revision: microsoft.softwareplan.operations.HybridUseBenefitRevisionOperations
:ivar operations: Operations operations
:vartype operations: microsoft.softwareplan.operations.Operations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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 = softwareplanClientConfiguration(credentials, subscription_id, base_url)
super(softwareplanClient, 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-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.software_plan = SoftwarePlanOperations(
self._client, self.config, self._serialize, self._deserialize)
self.hybrid_use_benefit = HybridUseBenefitOperations(
self._client, self.config, self._serialize, self._deserialize)
self.hybrid_use_benefit_revision = HybridUseBenefitRevisionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
53 changes: 53 additions & 0 deletions sdk/azure-mgmt/softwareplan/models/__init__.py
Original file line number Diff line number Diff line change
@@ -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.
# --------------------------------------------------------------------------

try:
from ._models_py3 import AzureEntityResource
from ._models_py3 import Error, ErrorException
from ._models_py3 import HybridUseBenefitModel
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationResponse
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import Sku
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
from ._models import AzureEntityResource
from ._models import Error, ErrorException
from ._models import HybridUseBenefitModel
from ._models import OperationDisplay
from ._models import OperationResponse
from ._models import ProxyResource
from ._models import Resource
from ._models import Sku
from ._models import TrackedResource
from ._paged_models import HybridUseBenefitModelPaged
from ._paged_models import OperationResponsePaged
from ._softwareplan_client_enums import (
ErrorCode,
ProvisioningState,
)

__all__ = [
'AzureEntityResource',
'Error', 'ErrorException',
'HybridUseBenefitModel',
'OperationDisplay',
'OperationResponse',
'ProxyResource',
'Resource',
'Sku',
'TrackedResource',
'HybridUseBenefitModelPaged',
'OperationResponsePaged',
'ErrorCode',
'ProvisioningState',
]
Loading