Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# 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 .property_batch_operation import PropertyBatchOperation
class PutPropertyBatchOperation(PropertyBatchOperation):
"""Puts the specified property under the specified name.
Note that if one PropertyBatchOperation in a PropertyBatch fails,
the entire batch fails and cannot be committed in a transactional manner.
All required parameters must be populated in order to send to Azure.
:param property_name: Required. The name of the Service Fabric property.
:type property_name: str
:param kind: Required. Constant filled by server.
:type kind: str
:param value: Required. Describes a Service Fabric property value.
:type value: ~azure.servicefabric.models.PropertyValue
:param custom_type_id: The property's custom type ID. Using this property,
the user is able to tag the type of the value of the property.
:type custom_type_id: str
"""
# 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 .property_batch_operation import PropertyBatchOperation
class CheckExistsPropertyBatchOperation(PropertyBatchOperation):
"""Represents a PropertyBatchOperation that compares the Boolean existence of
a property with the Exists argument.
The PropertyBatchOperation operation fails if the property's existence is
not equal to the Exists argument.
The CheckExistsPropertyBatchOperation is generally used as a precondition
for the write operations in the batch.
Note that if one PropertyBatchOperation in a PropertyBatch fails,
the entire batch fails and cannot be committed in a transactional manner.
All required parameters must be populated in order to send to Azure.
:param property_name: Required. The name of the Service Fabric property.
:type property_name: str
:param kind: Required. Constant filled by server.
:type kind: str
:param exists: Required. Whether or not the property should exist for the
# 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 .property_batch_operation import PropertyBatchOperation
class CheckValuePropertyBatchOperation(PropertyBatchOperation):
"""Represents a PropertyBatchOperation that compares the value of the property
with the expected value.
The CheckValuePropertyBatchOperation is generally used as a precondition
for the write operations in the batch.
Note that if one PropertyBatchOperation in a PropertyBatch fails,
the entire batch fails and cannot be committed in a transactional manner.
All required parameters must be populated in order to send to Azure.
:param property_name: Required. The name of the Service Fabric property.
:type property_name: str
:param kind: Required. Constant filled by server.
:type kind: str
:param value: Required. The expected property value.
:type value: ~azure.servicefabric.models.PropertyValue
"""
# 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 .property_batch_operation import PropertyBatchOperation
class CheckSequencePropertyBatchOperation(PropertyBatchOperation):
"""Compares the Sequence Number of a property with the SequenceNumber
argument.
A property's sequence number can be thought of as that property's version.
Every time the property is modified, its sequence number is increased.
The sequence number can be found in a property's metadata.
The comparison fails if the sequence numbers are not equal.
CheckSequencePropertyBatchOperation is generally used as a precondition for
the write operations in the batch.
Note that if one PropertyBatchOperation in a PropertyBatch fails,
the entire batch fails and cannot be committed in a transactional manner.
All required parameters must be populated in order to send to Azure.
:param property_name: Required. The name of the Service Fabric property.
:type property_name: str
:param kind: Required. Constant filled by server.
# 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 .property_batch_operation import PropertyBatchOperation
class DeletePropertyBatchOperation(PropertyBatchOperation):
"""Represents a PropertyBatchOperation that deletes a specified property if it
exists.
Note that if one PropertyBatchOperation in a PropertyBatch fails,
the entire batch fails and cannot be committed in a transactional manner.
All required parameters must be populated in order to send to Azure.
:param property_name: Required. The name of the Service Fabric property.
:type property_name: str
:param kind: Required. Constant filled by server.
:type kind: str
"""
_validation = {
'property_name': {'required': True},
'kind': {'required': True},
# 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 .property_batch_operation import PropertyBatchOperation
class GetPropertyBatchOperation(PropertyBatchOperation):
"""Represents a PropertyBatchOperation that gets the specified property if it
exists.
Note that if one PropertyBatchOperation in a PropertyBatch fails,
the entire batch fails and cannot be committed in a transactional manner.
All required parameters must be populated in order to send to Azure.
:param property_name: Required. The name of the Service Fabric property.
:type property_name: str
:param kind: Required. Constant filled by server.
:type kind: str
:param include_value: Whether or not to return the property value with the
metadata.
True if values should be returned with the metadata; False to return only
property metadata. Default value: False .
:type include_value: bool
def __init__(self, **kwargs):
super(PropertyBatchOperation, self).__init__(**kwargs)
self.property_name = kwargs.get('property_name', None)
self.kind = None