1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from azure.core.exceptions import HttpResponseError
import msrest.serialization
class Resource(msrest.serialization.Model):
"""Resource 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 location: Resource location.
:type location: str
:param tags: A set of 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(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 GenericResource(Resource):
"""Resource 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 location: Resource location.
:type location: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
:param managed_by: ID of the resource that manages this resource.
:type managed_by: str
:param sku: The SKU of the resource.
:type sku: ~azure.mgmt.resource.managedapplications.models.Sku
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.resource.managedapplications.models.Identity
"""
_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}'},
'managed_by': {'key': 'managedBy', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'Identity'},
}
def __init__(
self,
**kwargs
):
super(GenericResource, self).__init__(**kwargs)
self.managed_by = kwargs.get('managed_by', None)
self.sku = kwargs.get('sku', None)
self.identity = kwargs.get('identity', None)
class Application(GenericResource):
"""Information about managed application.
Variables are only populated 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 location: Resource location.
:type location: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
:param managed_by: ID of the resource that manages this resource.
:type managed_by: str
:param sku: The SKU of the resource.
:type sku: ~azure.mgmt.resource.managedapplications.models.Sku
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.resource.managedapplications.models.Identity
:param plan: The plan information.
:type plan: ~azure.mgmt.resource.managedapplications.models.Plan
:param kind: Required. The kind of the managed application. Allowed values are MarketPlace and
ServiceCatalog.
:type kind: str
:param managed_resource_group_id: Required. The managed resource group Id.
:type managed_resource_group_id: str
:param application_definition_id: The fully qualified path of managed application definition
Id.
:type application_definition_id: str
:param parameters: Name and value pairs that define the managed application parameters. It can
be a JObject or a well formed JSON string.
:type parameters: object
:ivar outputs: Name and value pairs that define the managed application outputs.
:vartype outputs: object
:ivar provisioning_state: The managed application provisioning state. Possible values include:
"Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled",
"Failed", "Succeeded", "Updating".
:vartype provisioning_state: str or
~azure.mgmt.resource.managedapplications.models.ProvisioningState
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'kind': {'required': True, 'pattern': r'^[-\w\._,\(\)]+$'},
'managed_resource_group_id': {'required': True},
'outputs': {'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}'},
'managed_by': {'key': 'managedBy', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'Identity'},
'plan': {'key': 'plan', 'type': 'Plan'},
'kind': {'key': 'kind', 'type': 'str'},
'managed_resource_group_id': {'key': 'properties.managedResourceGroupId', 'type': 'str'},
'application_definition_id': {'key': 'properties.applicationDefinitionId', 'type': 'str'},
'parameters': {'key': 'properties.parameters', 'type': 'object'},
'outputs': {'key': 'properties.outputs', 'type': 'object'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(Application, self).__init__(**kwargs)
self.plan = kwargs.get('plan', None)
self.kind = kwargs['kind']
self.managed_resource_group_id = kwargs['managed_resource_group_id']
self.application_definition_id = kwargs.get('application_definition_id', None)
self.parameters = kwargs.get('parameters', None)
self.outputs = None
self.provisioning_state = None
class ApplicationArtifact(msrest.serialization.Model):
"""Managed application artifact.
:param name: The managed application artifact name.
:type name: str
:param uri: The managed application artifact blob uri.
:type uri: str
:param type: The managed application artifact type. Possible values include: "Template",
"Custom".
:type type: str or ~azure.mgmt.resource.managedapplications.models.ApplicationArtifactType
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'uri': {'key': 'uri', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ApplicationArtifact, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.uri = kwargs.get('uri', None)
self.type = kwargs.get('type', None)
class ApplicationDefinition(GenericResource):
"""Information about managed application 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: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Resource location.
:type location: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
:param managed_by: ID of the resource that manages this resource.
:type managed_by: str
:param sku: The SKU of the resource.
:type sku: ~azure.mgmt.resource.managedapplications.models.Sku
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.resource.managedapplications.models.Identity
:param lock_level: Required. The managed application lock level. Possible values include:
"CanNotDelete", "ReadOnly", "None".
:type lock_level: str or ~azure.mgmt.resource.managedapplications.models.ApplicationLockLevel
:param display_name: The managed application definition display name.
:type display_name: str
:param is_enabled: A value indicating whether the package is enabled or not.
:type is_enabled: str
:param authorizations: Required. The managed application provider authorizations.
:type authorizations:
list[~azure.mgmt.resource.managedapplications.models.ApplicationProviderAuthorization]
:param artifacts: The collection of managed application artifacts. The portal will use the
files specified as artifacts to construct the user experience of creating a managed application
from a managed application definition.
:type artifacts: list[~azure.mgmt.resource.managedapplications.models.ApplicationArtifact]
:param description: The managed application definition description.
:type description: str
:param package_file_uri: The managed application definition package file Uri. Use this element.
:type package_file_uri: str
:param main_template: The inline main template json which has resources to be provisioned. It
can be a JObject or well-formed JSON string.
:type main_template: object
:param create_ui_definition: The createUiDefinition json for the backing template with
Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string.
:type create_ui_definition: object
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'lock_level': {'required': True},
'authorizations': {'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}'},
'managed_by': {'key': 'managedBy', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'Identity'},
'lock_level': {'key': 'properties.lockLevel', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'is_enabled': {'key': 'properties.isEnabled', 'type': 'str'},
'authorizations': {'key': 'properties.authorizations', 'type': '[ApplicationProviderAuthorization]'},
'artifacts': {'key': 'properties.artifacts', 'type': '[ApplicationArtifact]'},
'description': {'key': 'properties.description', 'type': 'str'},
'package_file_uri': {'key': 'properties.packageFileUri', 'type': 'str'},
'main_template': {'key': 'properties.mainTemplate', 'type': 'object'},
'create_ui_definition': {'key': 'properties.createUiDefinition', 'type': 'object'},
}
def __init__(
self,
**kwargs
):
super(ApplicationDefinition, self).__init__(**kwargs)
self.lock_level = kwargs['lock_level']
self.display_name = kwargs.get('display_name', None)
self.is_enabled = kwargs.get('is_enabled', None)
self.authorizations = kwargs['authorizations']
self.artifacts = kwargs.get('artifacts', None)
self.description = kwargs.get('description', None)
self.package_file_uri = kwargs.get('package_file_uri', None)
self.main_template = kwargs.get('main_template', None)
self.create_ui_definition = kwargs.get('create_ui_definition', None)
class ApplicationDefinitionListResult(msrest.serialization.Model):
"""List of managed application definitions.
:param value: The array of managed application definitions.
:type value: list[~azure.mgmt.resource.managedapplications.models.ApplicationDefinition]
:param next_link: The URL to use for getting the next set of results.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[ApplicationDefinition]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ApplicationDefinitionListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
class ApplicationListResult(msrest.serialization.Model):
"""List of managed applications.
:param value: The array of managed applications.
:type value: list[~azure.mgmt.resource.managedapplications.models.Application]
:param next_link: The URL to use for getting the next set of results.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[Application]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ApplicationListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
class ApplicationPatchable(GenericResource):
"""Information about managed application.
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 location: Resource location.
:type location: str
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
:param managed_by: ID of the resource that manages this resource.
:type managed_by: str
:param sku: The SKU of the resource.
:type sku: ~azure.mgmt.resource.managedapplications.models.Sku
:param identity: The identity of the resource.
:type identity: ~azure.mgmt.resource.managedapplications.models.Identity
:param plan: The plan information.
:type plan: ~azure.mgmt.resource.managedapplications.models.PlanPatchable
:param kind: The kind of the managed application. Allowed values are MarketPlace and
ServiceCatalog.
:type kind: str
:param managed_resource_group_id: The managed resource group Id.
:type managed_resource_group_id: str
:param application_definition_id: The fully qualified path of managed application definition
Id.
:type application_definition_id: str
:param parameters: Name and value pairs that define the managed application parameters. It can
be a JObject or a well formed JSON string.
:type parameters: object
:ivar outputs: Name and value pairs that define the managed application outputs.
:vartype outputs: object
:ivar provisioning_state: The managed application provisioning state. Possible values include:
"Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled",
"Failed", "Succeeded", "Updating".
:vartype provisioning_state: str or
~azure.mgmt.resource.managedapplications.models.ProvisioningState
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'kind': {'pattern': r'^[-\w\._,\(\)]+$'},
'outputs': {'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}'},
'managed_by': {'key': 'managedBy', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'Identity'},
'plan': {'key': 'plan', 'type': 'PlanPatchable'},
'kind': {'key': 'kind', 'type': 'str'},
'managed_resource_group_id': {'key': 'properties.managedResourceGroupId', 'type': 'str'},
'application_definition_id': {'key': 'properties.applicationDefinitionId', 'type': 'str'},
'parameters': {'key': 'properties.parameters', 'type': 'object'},
'outputs': {'key': 'properties.outputs', 'type': 'object'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ApplicationPatchable, self).__init__(**kwargs)
self.plan = kwargs.get('plan', None)
self.kind = kwargs.get('kind', None)
self.managed_resource_group_id = kwargs.get('managed_resource_group_id', None)
self.application_definition_id = kwargs.get('application_definition_id', None)
self.parameters = kwargs.get('parameters', None)
self.outputs = None
self.provisioning_state = None
class ApplicationProviderAuthorization(msrest.serialization.Model):
"""The managed application provider authorization.
All required parameters must be populated in order to send to Azure.
:param principal_id: Required. The provider's principal identifier. This is the identity that
the provider will use to call ARM to manage the managed application resources.
:type principal_id: str
:param role_definition_id: Required. The provider's role definition identifier. This role will
define all the permissions that the provider must have on the managed application's container
resource group. This role definition cannot have permission to delete the resource group.
:type role_definition_id: str
"""
_validation = {
'principal_id': {'required': True},
'role_definition_id': {'required': True},
}
_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ApplicationProviderAuthorization, self).__init__(**kwargs)
self.principal_id = kwargs['principal_id']
self.role_definition_id = kwargs['role_definition_id']
class ErrorResponse(msrest.serialization.Model):
"""Error response indicates managed application is not able to process the incoming request. The reason is provided in the error message.
:param http_status: Http status code.
:type http_status: str
:param error_code: Error code.
:type error_code: str
:param error_message: Error message indicating why the operation failed.
:type error_message: str
"""
_attribute_map = {
'http_status': {'key': 'httpStatus', 'type': 'str'},
'error_code': {'key': 'errorCode', 'type': 'str'},
'error_message': {'key': 'errorMessage', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ErrorResponse, self).__init__(**kwargs)
self.http_status = kwargs.get('http_status', None)
self.error_code = kwargs.get('error_code', None)
self.error_message = kwargs.get('error_message', None)
class Identity(msrest.serialization.Model):
"""Identity for the resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar principal_id: The principal ID of resource identity.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
:ivar type: The identity type. Default value: "SystemAssigned".
:vartype type: str
"""
_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
'type': {'constant': True},
}
_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
type = "SystemAssigned"
def __init__(
self,
**kwargs
):
super(Identity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
class Operation(msrest.serialization.Model):
"""Microsoft.Solutions operation.
:param name: Operation name: {provider}/{resource}/{operation}.
:type name: str
:param display: The object that represents the operation.
:type display: ~azure.mgmt.resource.managedapplications.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(msrest.serialization.Model):
"""The object that represents the operation.
:param provider: Service provider: Microsoft.Solutions.
:type provider: str
:param resource: Resource on which the operation is performed: Application, JitRequest, 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(msrest.serialization.Model):
"""Result of the request to list Microsoft.Solutions operations. It contains a list of operations and a URL link to get the next set of results.
:param value: List of Microsoft.Solutions operations.
:type value: list[~azure.mgmt.resource.managedapplications.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 Plan(msrest.serialization.Model):
"""Plan for the managed application.
All required parameters must be populated in order to send to Azure.
:param name: Required. The plan name.
:type name: str
:param publisher: Required. The publisher ID.
:type publisher: str
:param product: Required. The product code.
:type product: str
:param promotion_code: The promotion code.
:type promotion_code: str
:param version: Required. The plan's version.
:type version: str
"""
_validation = {
'name': {'required': True},
'publisher': {'required': True},
'product': {'required': True},
'version': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'publisher': {'key': 'publisher', 'type': 'str'},
'product': {'key': 'product', 'type': 'str'},
'promotion_code': {'key': 'promotionCode', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(Plan, self).__init__(**kwargs)
self.name = kwargs['name']
self.publisher = kwargs['publisher']
self.product = kwargs['product']
self.promotion_code = kwargs.get('promotion_code', None)
self.version = kwargs['version']
class PlanPatchable(msrest.serialization.Model):
"""Plan for the managed application.
:param name: The plan name.
:type name: str
:param publisher: The publisher ID.
:type publisher: str
:param product: The product code.
:type product: str
:param promotion_code: The promotion code.
:type promotion_code: str
:param version: The plan's version.
:type version: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'publisher': {'key': 'publisher', 'type': 'str'},
'product': {'key': 'product', 'type': 'str'},
'promotion_code': {'key': 'promotionCode', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(PlanPatchable, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.publisher = kwargs.get('publisher', None)
self.product = kwargs.get('product', None)
self.promotion_code = kwargs.get('promotion_code', None)
self.version = kwargs.get('version', None)
class Sku(msrest.serialization.Model):
"""SKU for the resource.
All required parameters must be populated in order to send to Azure.
:param name: Required. The SKU name.
:type name: str
:param tier: The SKU tier.
:type tier: str
:param size: The SKU size.
:type size: str
:param family: The SKU family.
:type family: str
:param model: The SKU model.
:type model: str
:param capacity: The SKU capacity.
: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'},
'model': {'key': 'model', 'type': 'str'},
'capacity': {'key': 'capacity', 'type': 'int'},
}
def __init__(
self,
**kwargs
):
super(Sku, self).__init__(**kwargs)
self.name = kwargs['name']
self.tier = kwargs.get('tier', None)
self.size = kwargs.get('size', None)
self.family = kwargs.get('family', None)
self.model = kwargs.get('model', None)
self.capacity = kwargs.get('capacity', None)
|