Skip to content
Draft
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 @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .marketplace_ordering_agreements import MarketplaceOrderingAgreements
from .version import VERSION
from ._configuration import MarketplaceOrderingAgreementsConfiguration
from ._marketplace_ordering_agreements import MarketplaceOrderingAgreements
__all__ = ['MarketplaceOrderingAgreements', 'MarketplaceOrderingAgreementsConfiguration']

__all__ = ['MarketplaceOrderingAgreements']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -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 MarketplaceOrderingAgreementsConfiguration(AzureConfiguration):
"""Configuration for MarketplaceOrderingAgreements
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 subscription ID that identifies an Azure
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(MarketplaceOrderingAgreementsConfiguration, 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-marketplaceordering/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,11 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.marketplace_agreements_operations import MarketplaceAgreementsOperations
from .operations.operations import Operations
from . import models


class MarketplaceOrderingAgreementsConfiguration(AzureConfiguration):
"""Configuration for MarketplaceOrderingAgreements
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 subscription ID that identifies an Azure
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(MarketplaceOrderingAgreementsConfiguration, self).__init__(base_url)

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

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import MarketplaceOrderingAgreementsConfiguration
from .operations import MarketplaceAgreementsOperations
from .operations import Operations
from . import models


class MarketplaceOrderingAgreements(SDKClient):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@
# --------------------------------------------------------------------------

try:
from .agreement_terms_py3 import AgreementTerms
from .error_response_error_py3 import ErrorResponseError
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .resource_py3 import Resource
from ._models_py3 import AgreementTerms
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import Resource
except (SyntaxError, ImportError):
from .agreement_terms import AgreementTerms
from .error_response_error import ErrorResponseError
from .error_response import ErrorResponse, ErrorResponseException
from .operation_display import OperationDisplay
from .operation import Operation
from .resource import Resource
from .operation_paged import OperationPaged
from ._models import AgreementTerms
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import Operation
from ._models import OperationDisplay
from ._models import Resource
from ._paged_models import OperationPaged

__all__ = [
'AgreementTerms',
'ErrorResponseError',
'ErrorResponse', 'ErrorResponseException',
'OperationDisplay',
'ErrorResponseError',
'Operation',
'OperationDisplay',
'Resource',
'OperationPaged',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by 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):
"""ARM 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 AgreementTerms(Resource):
"""Terms properties for provided Publisher/Offer/Plan tuple.

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 publisher: Publisher identifier string of image being deployed.
:type publisher: str
:param product: Offer identifier string of image being deployed.
:type product: str
:param plan: Plan identifier string of image being deployed.
:type plan: str
:param license_text_link: Link to HTML with Microsoft and Publisher terms.
:type license_text_link: str
:param privacy_policy_link: Link to the privacy policy of the publisher.
:type privacy_policy_link: str
:param retrieve_datetime: Date and time in UTC of when the terms were
accepted. This is empty if Accepted is false.
:type retrieve_datetime: str
:param signature: Terms signature.
:type signature: str
:param accepted: If any version of the terms have been accepted, otherwise
false.
:type accepted: 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'},
'publisher': {'key': 'properties.publisher', 'type': 'str'},
'product': {'key': 'properties.product', 'type': 'str'},
'plan': {'key': 'properties.plan', 'type': 'str'},
'license_text_link': {'key': 'properties.licenseTextLink', 'type': 'str'},
'privacy_policy_link': {'key': 'properties.privacyPolicyLink', 'type': 'str'},
'retrieve_datetime': {'key': 'properties.retrieveDatetime', 'type': 'str'},
'signature': {'key': 'properties.signature', 'type': 'str'},
'accepted': {'key': 'properties.accepted', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(AgreementTerms, self).__init__(**kwargs)
self.publisher = kwargs.get('publisher', None)
self.product = kwargs.get('product', None)
self.plan = kwargs.get('plan', None)
self.license_text_link = kwargs.get('license_text_link', None)
self.privacy_policy_link = kwargs.get('privacy_policy_link', None)
self.retrieve_datetime = kwargs.get('retrieve_datetime', None)
self.signature = kwargs.get('signature', None)
self.accepted = kwargs.get('accepted', None)


class CloudError(Model):
"""CloudError.
"""

_attribute_map = {
}


class ErrorResponse(Model):
"""Error response indicates Microsoft.MarketplaceOrdering 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.marketplaceordering.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(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(ErrorResponseError, self).__init__(**kwargs)
self.code = None
self.message = None


class Operation(Model):
"""Microsoft.MarketplaceOrdering 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.marketplaceordering.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.MarketplaceOrdering
:type provider: str
:param resource: Resource on which the operation is performed: Agreement,
virtualmachine, etc.
:type resource: str
:param operation: Operation type: Get Agreement, Sign Agreement, Cancel
Agreement 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)
Loading