Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,315 changes: 998 additions & 317 deletions azure-servicefabric/azure/servicefabric/models/__init__.py

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions azure-servicefabric/azure/servicefabric/models/aad_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ class AadMetadata(Model):
'tenant': {'key': 'tenant', 'type': 'str'},
}

def __init__(self, authority=None, client=None, cluster=None, login=None, redirect=None, tenant=None):
super(AadMetadata, self).__init__()
self.authority = authority
self.client = client
self.cluster = cluster
self.login = login
self.redirect = redirect
self.tenant = tenant
def __init__(self, **kwargs):
super(AadMetadata, self).__init__(**kwargs)
self.authority = kwargs.get('authority', None)
self.client = kwargs.get('client', None)
self.cluster = kwargs.get('cluster', None)
self.login = kwargs.get('login', None)
self.redirect = kwargs.get('redirect', None)
self.tenant = kwargs.get('tenant', None)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AadMetadataObject(Model):
'metadata': {'key': 'metadata', 'type': 'AadMetadata'},
}

def __init__(self, type=None, metadata=None):
super(AadMetadataObject, self).__init__()
self.type = type
self.metadata = metadata
def __init__(self, **kwargs):
super(AadMetadataObject, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.metadata = kwargs.get('metadata', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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


class AadMetadataObject(Model):
"""Azure Active Directory metadata object used for secured connection to
cluster.

:param type: The client authentication method.
:type type: str
:param metadata: Azure Active Directory metadata used for secured
connection to cluster.
:type metadata: ~azure.servicefabric.models.AadMetadata
"""

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': 'AadMetadata'},
}

def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None:
super(AadMetadataObject, self).__init__(**kwargs)
self.type = type
self.metadata = metadata
48 changes: 48 additions & 0 deletions azure-servicefabric/azure/servicefabric/models/aad_metadata_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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


class AadMetadata(Model):
"""Azure Active Directory metadata used for secured connection to cluster.

:param authority: The AAD authority url.
:type authority: str
:param client: The AAD client application Id.
:type client: str
:param cluster: The AAD cluster application Id.
:type cluster: str
:param login: The AAD login url.
:type login: str
:param redirect: The client application redirect address.
:type redirect: str
:param tenant: The AAD tenant Id.
:type tenant: str
"""

_attribute_map = {
'authority': {'key': 'authority', 'type': 'str'},
'client': {'key': 'client', 'type': 'str'},
'cluster': {'key': 'cluster', 'type': 'str'},
'login': {'key': 'login', 'type': 'str'},
'redirect': {'key': 'redirect', 'type': 'str'},
'tenant': {'key': 'tenant', 'type': 'str'},
}

def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None:
super(AadMetadata, self).__init__(**kwargs)
self.authority = authority
self.client = client
self.cluster = cluster
self.login = login
self.redirect = redirect
self.tenant = tenant
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 .scaling_mechanism_description import ScalingMechanismDescription


class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription):
"""Represents a scaling mechanism for adding or removing named partitions of a
stateless service. Partition names are in the format '0','1''N-1'.

All required parameters must be populated in order to send to Azure.

:param kind: Required. Constant filled by server.
:type kind: str
:param min_partition_count: Required. Minimum number of named partitions
of the service.
:type min_partition_count: int
:param max_partition_count: Required. Maximum number of named partitions
of the service.
:type max_partition_count: int
:param scale_increment: Required. The number of instances to add or remove
during a scaling operation.
:type scale_increment: int
"""

_validation = {
'kind': {'required': True},
'min_partition_count': {'required': True},
'max_partition_count': {'required': True},
'scale_increment': {'required': True},
}

_attribute_map = {
'kind': {'key': 'Kind', 'type': 'str'},
'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'},
'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'},
'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs)
self.min_partition_count = kwargs.get('min_partition_count', None)
self.max_partition_count = kwargs.get('max_partition_count', None)
self.scale_increment = kwargs.get('scale_increment', None)
self.kind = 'AddRemoveIncrementalNamedPartition'
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 .scaling_mechanism_description import ScalingMechanismDescription


class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription):
"""Represents a scaling mechanism for adding or removing named partitions of a
stateless service. Partition names are in the format '0','1''N-1'.

All required parameters must be populated in order to send to Azure.

:param kind: Required. Constant filled by server.
:type kind: str
:param min_partition_count: Required. Minimum number of named partitions
of the service.
:type min_partition_count: int
:param max_partition_count: Required. Maximum number of named partitions
of the service.
:type max_partition_count: int
:param scale_increment: Required. The number of instances to add or remove
during a scaling operation.
:type scale_increment: int
"""

_validation = {
'kind': {'required': True},
'min_partition_count': {'required': True},
'max_partition_count': {'required': True},
'scale_increment': {'required': True},
}

_attribute_map = {
'kind': {'key': 'Kind', 'type': 'str'},
'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'},
'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'},
'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'},
}

def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None:
super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs)
self.min_partition_count = min_partition_count
self.max_partition_count = max_partition_count
self.scale_increment = scale_increment
self.kind = 'AddRemoveIncrementalNamedPartition'
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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


class AnalysisEventMetadata(Model):
"""Metadata about an Analysis Event.

:param delay: The analysis delay.
:type delay: timedelta
:param duration: The duration of analysis.
:type duration: timedelta
"""

_attribute_map = {
'delay': {'key': 'Delay', 'type': 'duration'},
'duration': {'key': 'Duration', 'type': 'duration'},
}

def __init__(self, **kwargs):
super(AnalysisEventMetadata, self).__init__(**kwargs)
self.delay = kwargs.get('delay', None)
self.duration = kwargs.get('duration', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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


class AnalysisEventMetadata(Model):
"""Metadata about an Analysis Event.

:param delay: The analysis delay.
:type delay: timedelta
:param duration: The duration of analysis.
:type duration: timedelta
"""

_attribute_map = {
'delay': {'key': 'Delay', 'type': 'duration'},
'duration': {'key': 'Duration', 'type': 'duration'},
}

def __init__(self, *, delay=None, duration=None, **kwargs) -> None:
super(AnalysisEventMetadata, self).__init__(**kwargs)
self.delay = delay
self.duration = duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 .backup_configuration_info import BackupConfigurationInfo


class ApplicationBackupConfigurationInfo(BackupConfigurationInfo):
"""Backup configuration information for a specific Service Fabric application
specifying what backup policy is being applied and suspend description, if
any.

All required parameters must be populated in order to send to Azure.

:param policy_name: The name of the backup policy which is applicable to
this Service Fabric application or service or partition.
:type policy_name: str
:param policy_inherited_from: Specifies the scope at which the backup
policy is applied. Possible values include: 'Invalid', 'Partition',
'Service', 'Application'
:type policy_inherited_from: str or
~azure.servicefabric.models.BackupPolicyScope
:param suspension_info: Describes the backup suspension details.
:type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""

_validation = {
'kind': {'required': True},
}

_attribute_map = {
'policy_name': {'key': 'PolicyName', 'type': 'str'},
'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'},
'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs)
self.application_name = kwargs.get('application_name', None)
self.kind = 'Application'
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 .backup_configuration_info import BackupConfigurationInfo


class ApplicationBackupConfigurationInfo(BackupConfigurationInfo):
"""Backup configuration information for a specific Service Fabric application
specifying what backup policy is being applied and suspend description, if
any.

All required parameters must be populated in order to send to Azure.

:param policy_name: The name of the backup policy which is applicable to
this Service Fabric application or service or partition.
:type policy_name: str
:param policy_inherited_from: Specifies the scope at which the backup
policy is applied. Possible values include: 'Invalid', 'Partition',
'Service', 'Application'
:type policy_inherited_from: str or
~azure.servicefabric.models.BackupPolicyScope
:param suspension_info: Describes the backup suspension details.
:type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""

_validation = {
'kind': {'required': True},
}

_attribute_map = {
'policy_name': {'key': 'PolicyName', 'type': 'str'},
'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'},
'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}

def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None:
super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs)
self.application_name = application_name
self.kind = 'Application'
Loading