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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2015-06-01"
self.api_version = "2021-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-marketplaceordering/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.marketplace_agreements = MarketplaceAgreementsOperations(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"chosen_version": "2021-01-01",
"total_api_version_list": ["2021-01-01"],
"client": {
"name": "MarketplaceOrderingAgreements",
"filename": "_marketplace_ordering_agreements",
"description": "REST API for MarketplaceOrdering Agreements.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false,
"client_side_validation": true
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The subscription ID that identifies an Azure subscription.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The subscription ID that identifies an Azure subscription.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
},
"operation_groups": {
"marketplace_agreements": "MarketplaceAgreementsOperations",
"operations": "Operations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2015-06-01"
self.api_version = "2021-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-marketplaceordering/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.marketplace_agreements = MarketplaceAgreementsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -138,7 +138,7 @@ async def create(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -207,7 +207,7 @@ async def sign(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -270,7 +270,7 @@ async def cancel(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -333,7 +333,7 @@ async def get_agreement(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -387,7 +387,7 @@ async def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-01"
api_version = "2021-01-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationListResult
from ._models_py3 import Resource
from ._models_py3 import SystemData
except (SyntaxError, ImportError):
from ._models import AgreementTerms # type: ignore
from ._models import ErrorResponse # type: ignore
Expand All @@ -22,8 +23,10 @@
from ._models import OperationDisplay # type: ignore
from ._models import OperationListResult # type: ignore
from ._models import Resource # type: ignore
from ._models import SystemData # type: ignore

from ._marketplace_ordering_agreements_enums import (
CreatedByType,
OfferType,
)

Expand All @@ -35,5 +38,7 @@
'OperationDisplay',
'OperationListResult',
'Resource',
'SystemData',
'CreatedByType',
'OfferType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def __getattr__(cls, name):
raise AttributeError(name)


class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The type of identity that created the resource.
"""

USER = "User"
APPLICATION = "Application"
MANAGED_IDENTITY = "ManagedIdentity"
KEY = "Key"

class OfferType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):

VIRTUALMACHINE = "virtualmachine"
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class AgreementTerms(Resource):
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar system_data: The system meta data relating to this resource.
:vartype system_data: ~azure.mgmt.marketplaceordering.models.SystemData
:param publisher: Publisher identifier string of image being deployed.
:type publisher: str
:param product: Offer identifier string of image being deployed.
Expand All @@ -66,6 +68,8 @@ class AgreementTerms(Resource):
:type license_text_link: str
:param privacy_policy_link: Link to the privacy policy of the publisher.
:type privacy_policy_link: str
:param marketplace_terms_link: Link to HTML with Azure Marketplace terms.
:type marketplace_terms_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
Expand All @@ -79,17 +83,20 @@ class AgreementTerms(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'system_data': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
'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'},
'marketplace_terms_link': {'key': 'properties.marketplaceTermsLink', 'type': 'str'},
'retrieve_datetime': {'key': 'properties.retrieveDatetime', 'type': 'str'},
'signature': {'key': 'properties.signature', 'type': 'str'},
'accepted': {'key': 'properties.accepted', 'type': 'bool'},
Expand All @@ -100,11 +107,13 @@ def __init__(
**kwargs
):
super(AgreementTerms, self).__init__(**kwargs)
self.system_data = None
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.marketplace_terms_link = kwargs.get('marketplace_terms_link', None)
self.retrieve_datetime = kwargs.get('retrieve_datetime', None)
self.signature = kwargs.get('signature', None)
self.accepted = kwargs.get('accepted', None)
Expand Down Expand Up @@ -237,3 +246,44 @@ def __init__(
super(OperationListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = None


class SystemData(msrest.serialization.Model):
"""Metadata pertaining to creation and last modification of the resource.

:param created_by: The identity that created the resource.
:type created_by: str
:param created_by_type: The type of identity that created the resource. Possible values
include: "User", "Application", "ManagedIdentity", "Key".
:type created_by_type: str or ~azure.mgmt.marketplaceordering.models.CreatedByType
:param created_at: The timestamp of resource creation (UTC).
:type created_at: ~datetime.datetime
:param last_modified_by: The identity that last modified the resource.
:type last_modified_by: str
:param last_modified_by_type: The type of identity that last modified the resource. Possible
values include: "User", "Application", "ManagedIdentity", "Key".
:type last_modified_by_type: str or ~azure.mgmt.marketplaceordering.models.CreatedByType
:param last_modified_at: The timestamp of resource last modification (UTC).
:type last_modified_at: ~datetime.datetime
"""

_attribute_map = {
'created_by': {'key': 'createdBy', 'type': 'str'},
'created_by_type': {'key': 'createdByType', 'type': 'str'},
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
}

def __init__(
self,
**kwargs
):
super(SystemData, self).__init__(**kwargs)
self.created_by = kwargs.get('created_by', None)
self.created_by_type = kwargs.get('created_by_type', None)
self.created_at = kwargs.get('created_at', None)
self.last_modified_by = kwargs.get('last_modified_by', None)
self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
self.last_modified_at = kwargs.get('last_modified_at', None)
Loading