# 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 .proxy_resource_py3 import ProxyResource
[docs]class ApplicationResourceUpdate(ProxyResource):
"""The application resource for patch operations.
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: Azure resource ID.
:vartype id: str
:ivar name: Azure resource name.
:vartype name: str
:ivar type: Azure resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param type_version:
:type type_version: str
:param parameters:
:type parameters:
list[~azure.mgmt.servicefabric.models.ApplicationParameter]
:param upgrade_policy:
:type upgrade_policy:
~azure.mgmt.servicefabric.models.ApplicationUpgradePolicy
:param minimum_nodes: The minimum number of nodes where Service Fabric
will reserve capacity for this application. Note that this does not mean
that the services of this application will be placed on all of those
nodes. If this property is set to zero, no capacity will be reserved. The
value of this property cannot be more than the value of the MaximumNodes
property.
:type minimum_nodes: long
:param maximum_nodes: The maximum number of nodes where Service Fabric
will reserve capacity for this application. Note that this does not mean
that the services of this application will be placed on all of those
nodes. By default, the value of this property is zero and it means that
the services can be placed on any node. Default value: 0 .
:type maximum_nodes: long
:param remove_application_capacity: The version of the application type
:type remove_application_capacity: bool
:param metrics:
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'minimum_nodes': {'minimum': 0},
'maximum_nodes': {'minimum': 0},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'type_version': {'key': 'properties.typeVersion', 'type': 'str'},
'parameters': {'key': 'properties.parameters', 'type': '[ApplicationParameter]'},
'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'},
'minimum_nodes': {'key': 'properties.minimumNodes', 'type': 'long'},
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
}
def __init__(self, *, location: str, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, **kwargs) -> None:
super(ApplicationResourceUpdate, self).__init__(location=location, **kwargs)
self.type_version = type_version
self.parameters = parameters
self.upgrade_policy = upgrade_policy
self.minimum_nodes = minimum_nodes
self.maximum_nodes = maximum_nodes
self.remove_application_capacity = remove_application_capacity
self.metrics = metrics