diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/__init__.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/__init__.py new file mode 100644 index 000000000000..667f96329533 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/__init__.py @@ -0,0 +1,18 @@ +# 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 .service_fabric_mesh_management_client import ServiceFabricMeshManagementClient +from .version import VERSION + +__all__ = ['ServiceFabricMeshManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/__init__.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/__init__.py new file mode 100644 index 000000000000..ebcbf09696c0 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/__init__.py @@ -0,0 +1,159 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource + from .managed_proxy_resource_py3 import ManagedProxyResource + from .tracked_resource_py3 import TrackedResource + from .provisioned_resource_properties_py3 import ProvisionedResourceProperties + from .layer4_ingress_config_py3 import Layer4IngressConfig + from .ingress_config_py3 import IngressConfig + from .network_resource_description_py3 import NetworkResourceDescription + from .network_properties_py3 import NetworkProperties + from .volume_provider_parameters_azure_file_py3 import VolumeProviderParametersAzureFile + from .volume_resource_description_py3 import VolumeResourceDescription + from .volume_properties_py3 import VolumeProperties + from .service_resource_description_py3 import ServiceResourceDescription + from .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties + from .diagnostics_description_py3 import DiagnosticsDescription + from .application_resource_description_py3 import ApplicationResourceDescription + from .application_properties_py3 import ApplicationProperties + from .container_state_py3 import ContainerState + from .container_event_py3 import ContainerEvent + from .container_instance_view_py3 import ContainerInstanceView + from .container_label_py3 import ContainerLabel + from .container_logs_py3 import ContainerLogs + from .image_registry_credential_py3 import ImageRegistryCredential + from .resource_limits_py3 import ResourceLimits + from .resource_requests_py3 import ResourceRequests + from .resource_requirements_py3 import ResourceRequirements + from .available_operation_display_py3 import AvailableOperationDisplay + from .operation_result_py3 import OperationResult + from .error_model_py3 import ErrorModel, ErrorModelException + from .environment_variable_py3 import EnvironmentVariable + from .setting_py3 import Setting + from .endpoint_properties_py3 import EndpointProperties + from .container_volume_py3 import ContainerVolume + from .diagnostics_ref_py3 import DiagnosticsRef + from .container_code_package_properties_py3 import ContainerCodePackageProperties + from .service_replica_description_py3 import ServiceReplicaDescription + from .network_ref_py3 import NetworkRef + from .service_replica_properties_py3 import ServiceReplicaProperties + from .azure_internal_monitoring_pipeline_sink_description_py3 import AzureInternalMonitoringPipelineSinkDescription +except (SyntaxError, ImportError): + from .resource import Resource + from .proxy_resource import ProxyResource + from .managed_proxy_resource import ManagedProxyResource + from .tracked_resource import TrackedResource + from .provisioned_resource_properties import ProvisionedResourceProperties + from .layer4_ingress_config import Layer4IngressConfig + from .ingress_config import IngressConfig + from .network_resource_description import NetworkResourceDescription + from .network_properties import NetworkProperties + from .volume_provider_parameters_azure_file import VolumeProviderParametersAzureFile + from .volume_resource_description import VolumeResourceDescription + from .volume_properties import VolumeProperties + from .service_resource_description import ServiceResourceDescription + from .diagnostics_sink_properties import DiagnosticsSinkProperties + from .diagnostics_description import DiagnosticsDescription + from .application_resource_description import ApplicationResourceDescription + from .application_properties import ApplicationProperties + from .container_state import ContainerState + from .container_event import ContainerEvent + from .container_instance_view import ContainerInstanceView + from .container_label import ContainerLabel + from .container_logs import ContainerLogs + from .image_registry_credential import ImageRegistryCredential + from .resource_limits import ResourceLimits + from .resource_requests import ResourceRequests + from .resource_requirements import ResourceRequirements + from .available_operation_display import AvailableOperationDisplay + from .operation_result import OperationResult + from .error_model import ErrorModel, ErrorModelException + from .environment_variable import EnvironmentVariable + from .setting import Setting + from .endpoint_properties import EndpointProperties + from .container_volume import ContainerVolume + from .diagnostics_ref import DiagnosticsRef + from .container_code_package_properties import ContainerCodePackageProperties + from .service_replica_description import ServiceReplicaDescription + from .network_ref import NetworkRef + from .service_replica_properties import ServiceReplicaProperties + from .azure_internal_monitoring_pipeline_sink_description import AzureInternalMonitoringPipelineSinkDescription +from .application_resource_description_paged import ApplicationResourceDescriptionPaged +from .service_resource_description_paged import ServiceResourceDescriptionPaged +from .service_replica_description_paged import ServiceReplicaDescriptionPaged +from .operation_result_paged import OperationResultPaged +from .network_resource_description_paged import NetworkResourceDescriptionPaged +from .volume_resource_description_paged import VolumeResourceDescriptionPaged +from .service_fabric_mesh_management_client_enums import ( + IngressQoSLevel, + HealthState, + ServiceResourceStatus, + ApplicationResourceStatus, + OperatingSystemTypes, + DiagnosticsSinkKind, +) + +__all__ = [ + 'Resource', + 'ProxyResource', + 'ManagedProxyResource', + 'TrackedResource', + 'ProvisionedResourceProperties', + 'Layer4IngressConfig', + 'IngressConfig', + 'NetworkResourceDescription', + 'NetworkProperties', + 'VolumeProviderParametersAzureFile', + 'VolumeResourceDescription', + 'VolumeProperties', + 'ServiceResourceDescription', + 'DiagnosticsSinkProperties', + 'DiagnosticsDescription', + 'ApplicationResourceDescription', + 'ApplicationProperties', + 'ContainerState', + 'ContainerEvent', + 'ContainerInstanceView', + 'ContainerLabel', + 'ContainerLogs', + 'ImageRegistryCredential', + 'ResourceLimits', + 'ResourceRequests', + 'ResourceRequirements', + 'AvailableOperationDisplay', + 'OperationResult', + 'ErrorModel', 'ErrorModelException', + 'EnvironmentVariable', + 'Setting', + 'EndpointProperties', + 'ContainerVolume', + 'DiagnosticsRef', + 'ContainerCodePackageProperties', + 'ServiceReplicaDescription', + 'NetworkRef', + 'ServiceReplicaProperties', + 'AzureInternalMonitoringPipelineSinkDescription', + 'ApplicationResourceDescriptionPaged', + 'ServiceResourceDescriptionPaged', + 'ServiceReplicaDescriptionPaged', + 'OperationResultPaged', + 'NetworkResourceDescriptionPaged', + 'VolumeResourceDescriptionPaged', + 'IngressQoSLevel', + 'HealthState', + 'ServiceResourceStatus', + 'ApplicationResourceStatus', + 'OperatingSystemTypes', + 'DiagnosticsSinkKind', +] diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_properties.py new file mode 100644 index 000000000000..84897a994a80 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_properties.py @@ -0,0 +1,81 @@ +# 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 ApplicationProperties(Model): + """This type describes properties of an application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: User readable description of the application. + :type description: str + :param debug_params: Internal use. + :type debug_params: str + :param services: describes the services in the application. + :type services: + list[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or + ~azure.mgmt.servicefabricmesh.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :ivar status: Status of the application resource. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceStatus + :ivar status_details: Gives additional information about the current + status of the application deployment. + :vartype status_details: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: + ~azure.mgmt.servicefabricmesh.models.DiagnosticsDescription + """ + + _validation = { + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'service_names': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'debug_params': {'key': 'debugParams', 'type': 'str'}, + 'services': {'key': 'services', 'type': '[ServiceResourceDescription]'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'service_names': {'key': 'serviceNames', 'type': '[str]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.debug_params = kwargs.get('debug_params', None) + self.services = kwargs.get('services', None) + self.health_state = None + self.unhealthy_evaluation = None + self.status = None + self.status_details = None + self.service_names = None + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_properties_py3.py new file mode 100644 index 000000000000..20f8ffdbcc1e --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_properties_py3.py @@ -0,0 +1,81 @@ +# 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 ApplicationProperties(Model): + """This type describes properties of an application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: User readable description of the application. + :type description: str + :param debug_params: Internal use. + :type debug_params: str + :param services: describes the services in the application. + :type services: + list[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or + ~azure.mgmt.servicefabricmesh.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :ivar status: Status of the application resource. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceStatus + :ivar status_details: Gives additional information about the current + status of the application deployment. + :vartype status_details: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: + ~azure.mgmt.servicefabricmesh.models.DiagnosticsDescription + """ + + _validation = { + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'service_names': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'debug_params': {'key': 'debugParams', 'type': 'str'}, + 'services': {'key': 'services', 'type': '[ServiceResourceDescription]'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'service_names': {'key': 'serviceNames', 'type': '[str]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsDescription'}, + } + + def __init__(self, *, description: str=None, debug_params: str=None, services=None, diagnostics=None, **kwargs) -> None: + super(ApplicationProperties, self).__init__(**kwargs) + self.description = description + self.debug_params = debug_params + self.services = services + self.health_state = None + self.unhealthy_evaluation = None + self.status = None + self.status_details = None + self.service_names = None + self.diagnostics = diagnostics diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description.py new file mode 100644 index 000000000000..96fc2589c7d5 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description.py @@ -0,0 +1,106 @@ +# 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 .tracked_resource import TrackedResource + + +class ApplicationResourceDescription(TrackedResource): + """This type describes an application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + :param description: User readable description of the application. + :type description: str + :param debug_params: Internal use. + :type debug_params: str + :param services: describes the services in the application. + :type services: + list[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or + ~azure.mgmt.servicefabricmesh.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :ivar status: Status of the application resource. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceStatus + :ivar status_details: Gives additional information about the current + status of the application deployment. + :vartype status_details: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: + ~azure.mgmt.servicefabricmesh.models.DiagnosticsDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'service_names': {'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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.debug_params = kwargs.get('debug_params', None) + self.services = kwargs.get('services', None) + self.health_state = None + self.unhealthy_evaluation = None + self.status = None + self.status_details = None + self.service_names = None + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description_paged.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description_paged.py new file mode 100644 index 000000000000..cef270543b15 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class ApplicationResourceDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationResourceDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationResourceDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description_py3.py new file mode 100644 index 000000000000..4c49528aedcf --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/application_resource_description_py3.py @@ -0,0 +1,106 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ApplicationResourceDescription(TrackedResource): + """This type describes an application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + :param description: User readable description of the application. + :type description: str + :param debug_params: Internal use. + :type debug_params: str + :param services: describes the services in the application. + :type services: + list[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or + ~azure.mgmt.servicefabricmesh.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :ivar status: Status of the application resource. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceStatus + :ivar status_details: Gives additional information about the current + status of the application deployment. + :vartype status_details: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: + ~azure.mgmt.servicefabricmesh.models.DiagnosticsDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'service_names': {'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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, debug_params: str=None, services=None, diagnostics=None, **kwargs) -> None: + super(ApplicationResourceDescription, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.description = description + self.debug_params = debug_params + self.services = services + self.health_state = None + self.unhealthy_evaluation = None + self.status = None + self.status_details = None + self.service_names = None + self.diagnostics = diagnostics diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/available_operation_display.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/available_operation_display.py new file mode 100644 index 000000000000..a19c06e222c3 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/available_operation_display.py @@ -0,0 +1,40 @@ +# 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 AvailableOperationDisplay(Model): + """An operation available at the listed Azure resource provider. + + :param provider: Name of the operation provider. + :type provider: str + :param resource: Name of the resource on which the operation is available. + :type resource: str + :param operation: Name of the available operation. + :type operation: str + :param description: Description of the available operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AvailableOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/available_operation_display_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/available_operation_display_py3.py new file mode 100644 index 000000000000..214daf78744b --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/available_operation_display_py3.py @@ -0,0 +1,40 @@ +# 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 AvailableOperationDisplay(Model): + """An operation available at the listed Azure resource provider. + + :param provider: Name of the operation provider. + :type provider: str + :param resource: Name of the resource on which the operation is available. + :type resource: str + :param operation: Name of the available operation. + :type operation: str + :param description: Description of the available operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(AvailableOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description.py new file mode 100644 index 000000000000..07ac7ed6db19 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description.py @@ -0,0 +1,63 @@ +# 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 .diagnostics_sink_properties import DiagnosticsSinkProperties + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param account_name: Azure Internal monitoring pipeline account. + :type account_name: str + :param namespace: Azure Internal monitoring pipeline account namespace. + :type namespace: str + :param ma_config_url: Azure Internal monitoring agent configuration. + :type ma_config_url: str + :param fluentd_config_url: Azure Internal monitoring agent fluentd + configuration. + :type fluentd_config_url: object + :param auto_key_config_url: Azure Internal monitoring pipeline autokey + associated with the certificate. + :type auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'object'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.namespace = kwargs.get('namespace', None) + self.ma_config_url = kwargs.get('ma_config_url', None) + self.fluentd_config_url = kwargs.get('fluentd_config_url', None) + self.auto_key_config_url = kwargs.get('auto_key_config_url', None) + self.kind = 'AzureInternalMonitoringPipeline' diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description_py3.py new file mode 100644 index 000000000000..f4771409e03a --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/azure_internal_monitoring_pipeline_sink_description_py3.py @@ -0,0 +1,63 @@ +# 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 .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param account_name: Azure Internal monitoring pipeline account. + :type account_name: str + :param namespace: Azure Internal monitoring pipeline account namespace. + :type namespace: str + :param ma_config_url: Azure Internal monitoring agent configuration. + :type ma_config_url: str + :param fluentd_config_url: Azure Internal monitoring agent fluentd + configuration. + :type fluentd_config_url: object + :param auto_key_config_url: Azure Internal monitoring pipeline autokey + associated with the certificate. + :type auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'object'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, account_name: str=None, namespace: str=None, ma_config_url: str=None, fluentd_config_url=None, auto_key_config_url: str=None, **kwargs) -> None: + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) + self.account_name = account_name + self.namespace = namespace + self.ma_config_url = ma_config_url + self.fluentd_config_url = fluentd_config_url + self.auto_key_config_url = auto_key_config_url + self.kind = 'AzureInternalMonitoringPipeline' diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_code_package_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_code_package_properties.py new file mode 100644 index 000000000000..cc26ea11437e --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_code_package_properties.py @@ -0,0 +1,99 @@ +# 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 ContainerCodePackageProperties(Model): + """Describes a container and its runtime properties. + + 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. + + :param name: Required. The name of the code package. + :type name: str + :param image: Required. The Container image to use. + :type image: str + :param image_registry_credential: Image registry credential. + :type image_registry_credential: + ~azure.mgmt.servicefabricmesh.models.ImageRegistryCredential + :param entrypoint: Override for the default entry point in the container. + :type entrypoint: str + :param commands: Command array to execute within the container in exec + form. + :type commands: list[str] + :param environment_variables: The environment variables to set in this + container + :type environment_variables: + list[~azure.mgmt.servicefabricmesh.models.EnvironmentVariable] + :param settings: The settings to set in this container. The setting file + path can be fetched from environment variable "Fabric_SettingPath". The + path for Windows container is "C:\\\\secrets". The path for Linux + container is "/var/secrets". + :type settings: list[~azure.mgmt.servicefabricmesh.models.Setting] + :param labels: The labels to set in this container. + :type labels: list[~azure.mgmt.servicefabricmesh.models.ContainerLabel] + :param endpoints: The endpoints exposed by this container. + :type endpoints: + list[~azure.mgmt.servicefabricmesh.models.EndpointProperties] + :param resources: Required. This type describes the resource requirements + for a container or a service. + :type resources: ~azure.mgmt.servicefabricmesh.models.ResourceRequirements + :param volume_refs: The volumes to be attached to the container. + :type volume_refs: + list[~azure.mgmt.servicefabricmesh.models.ContainerVolume] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: + ~azure.mgmt.servicefabricmesh.models.ContainerInstanceView + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entrypoint': {'key': 'entrypoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[ContainerVolume]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, **kwargs): + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.image = kwargs.get('image', None) + self.image_registry_credential = kwargs.get('image_registry_credential', None) + self.entrypoint = kwargs.get('entrypoint', None) + self.commands = kwargs.get('commands', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.settings = kwargs.get('settings', None) + self.labels = kwargs.get('labels', None) + self.endpoints = kwargs.get('endpoints', None) + self.resources = kwargs.get('resources', None) + self.volume_refs = kwargs.get('volume_refs', None) + self.instance_view = None + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_code_package_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_code_package_properties_py3.py new file mode 100644 index 000000000000..490c8fa799eb --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_code_package_properties_py3.py @@ -0,0 +1,99 @@ +# 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 ContainerCodePackageProperties(Model): + """Describes a container and its runtime properties. + + 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. + + :param name: Required. The name of the code package. + :type name: str + :param image: Required. The Container image to use. + :type image: str + :param image_registry_credential: Image registry credential. + :type image_registry_credential: + ~azure.mgmt.servicefabricmesh.models.ImageRegistryCredential + :param entrypoint: Override for the default entry point in the container. + :type entrypoint: str + :param commands: Command array to execute within the container in exec + form. + :type commands: list[str] + :param environment_variables: The environment variables to set in this + container + :type environment_variables: + list[~azure.mgmt.servicefabricmesh.models.EnvironmentVariable] + :param settings: The settings to set in this container. The setting file + path can be fetched from environment variable "Fabric_SettingPath". The + path for Windows container is "C:\\\\secrets". The path for Linux + container is "/var/secrets". + :type settings: list[~azure.mgmt.servicefabricmesh.models.Setting] + :param labels: The labels to set in this container. + :type labels: list[~azure.mgmt.servicefabricmesh.models.ContainerLabel] + :param endpoints: The endpoints exposed by this container. + :type endpoints: + list[~azure.mgmt.servicefabricmesh.models.EndpointProperties] + :param resources: Required. This type describes the resource requirements + for a container or a service. + :type resources: ~azure.mgmt.servicefabricmesh.models.ResourceRequirements + :param volume_refs: The volumes to be attached to the container. + :type volume_refs: + list[~azure.mgmt.servicefabricmesh.models.ContainerVolume] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: + ~azure.mgmt.servicefabricmesh.models.ContainerInstanceView + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entrypoint': {'key': 'entrypoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[ContainerVolume]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entrypoint: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, diagnostics=None, **kwargs) -> None: + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = name + self.image = image + self.image_registry_credential = image_registry_credential + self.entrypoint = entrypoint + self.commands = commands + self.environment_variables = environment_variables + self.settings = settings + self.labels = labels + self.endpoints = endpoints + self.resources = resources + self.volume_refs = volume_refs + self.instance_view = None + self.diagnostics = diagnostics diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_event.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_event.py new file mode 100644 index 000000000000..36bb437c0be0 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_event.py @@ -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 ContainerEvent(Model): + """A container event. + + :param name: The name of the container event. + :type name: str + :param count: The count of the event. + :type count: int + :param first_timestamp: Date/time of the first event. + :type first_timestamp: str + :param last_timestamp: Date/time of the last event. + :type last_timestamp: str + :param message: The event message + :type message: str + :param type: The event type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerEvent, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.first_timestamp = kwargs.get('first_timestamp', None) + self.last_timestamp = kwargs.get('last_timestamp', None) + self.message = kwargs.get('message', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_event_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_event_py3.py new file mode 100644 index 000000000000..4851036a54cc --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_event_py3.py @@ -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 ContainerEvent(Model): + """A container event. + + :param name: The name of the container event. + :type name: str + :param count: The count of the event. + :type count: int + :param first_timestamp: Date/time of the first event. + :type first_timestamp: str + :param last_timestamp: Date/time of the last event. + :type last_timestamp: str + :param message: The event message + :type message: str + :param type: The event type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, count: int=None, first_timestamp: str=None, last_timestamp: str=None, message: str=None, type: str=None, **kwargs) -> None: + super(ContainerEvent, self).__init__(**kwargs) + self.name = name + self.count = count + self.first_timestamp = first_timestamp + self.last_timestamp = last_timestamp + self.message = message + self.type = type diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_instance_view.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_instance_view.py new file mode 100644 index 000000000000..6ed229dabd92 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_instance_view.py @@ -0,0 +1,41 @@ +# 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 ContainerInstanceView(Model): + """Runtime information of a container instance. + + :param restart_count: The number of times the container has been + restarted. + :type restart_count: int + :param current_state: Current container instance state. + :type current_state: ~azure.mgmt.servicefabricmesh.models.ContainerState + :param previous_state: Previous container instance state. + :type previous_state: ~azure.mgmt.servicefabricmesh.models.ContainerState + :param events: The events of this container instance. + :type events: list[~azure.mgmt.servicefabricmesh.models.ContainerEvent] + """ + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + } + + def __init__(self, **kwargs): + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = kwargs.get('restart_count', None) + self.current_state = kwargs.get('current_state', None) + self.previous_state = kwargs.get('previous_state', None) + self.events = kwargs.get('events', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_instance_view_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_instance_view_py3.py new file mode 100644 index 000000000000..abb2a93f48a9 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_instance_view_py3.py @@ -0,0 +1,41 @@ +# 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 ContainerInstanceView(Model): + """Runtime information of a container instance. + + :param restart_count: The number of times the container has been + restarted. + :type restart_count: int + :param current_state: Current container instance state. + :type current_state: ~azure.mgmt.servicefabricmesh.models.ContainerState + :param previous_state: Previous container instance state. + :type previous_state: ~azure.mgmt.servicefabricmesh.models.ContainerState + :param events: The events of this container instance. + :type events: list[~azure.mgmt.servicefabricmesh.models.ContainerEvent] + """ + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + } + + def __init__(self, *, restart_count: int=None, current_state=None, previous_state=None, events=None, **kwargs) -> None: + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = restart_count + self.current_state = current_state + self.previous_state = previous_state + self.events = events diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_label.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_label.py new file mode 100644 index 000000000000..f474f141d643 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_label.py @@ -0,0 +1,39 @@ +# 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 ContainerLabel(Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container label. + :type name: str + :param value: Required. The value of the container label. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerLabel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_label_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_label_py3.py new file mode 100644 index 000000000000..118326393d68 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_label_py3.py @@ -0,0 +1,39 @@ +# 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 ContainerLabel(Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container label. + :type name: str + :param value: Required. The value of the container label. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(ContainerLabel, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_logs.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_logs.py new file mode 100644 index 000000000000..ff23a311d66e --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_logs.py @@ -0,0 +1,28 @@ +# 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 ContainerLogs(Model): + """The logs of the container. + + :param content: content of the log. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerLogs, self).__init__(**kwargs) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_logs_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_logs_py3.py new file mode 100644 index 000000000000..18608f119803 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_logs_py3.py @@ -0,0 +1,28 @@ +# 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 ContainerLogs(Model): + """The logs of the container. + + :param content: content of the log. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, content: str=None, **kwargs) -> None: + super(ContainerLogs, self).__init__(**kwargs) + self.content = content diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_state.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_state.py new file mode 100644 index 000000000000..3e2c2bf0f367 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_state.py @@ -0,0 +1,44 @@ +# 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 ContainerState(Model): + """The container state. + + :param state: The state of this container + :type state: str + :param start_time: Date/time when the container state started. + :type start_time: datetime + :param exit_code: The container exit code. + :type exit_code: str + :param finish_time: Date/time when the container state finished. + :type finish_time: datetime + :param detail_status: Human-readable status of this state. + :type detail_status: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'str'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerState, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.start_time = kwargs.get('start_time', None) + self.exit_code = kwargs.get('exit_code', None) + self.finish_time = kwargs.get('finish_time', None) + self.detail_status = kwargs.get('detail_status', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_state_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_state_py3.py new file mode 100644 index 000000000000..eb2f51953faf --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_state_py3.py @@ -0,0 +1,44 @@ +# 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 ContainerState(Model): + """The container state. + + :param state: The state of this container + :type state: str + :param start_time: Date/time when the container state started. + :type start_time: datetime + :param exit_code: The container exit code. + :type exit_code: str + :param finish_time: Date/time when the container state finished. + :type finish_time: datetime + :param detail_status: Human-readable status of this state. + :type detail_status: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'str'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, *, state: str=None, start_time=None, exit_code: str=None, finish_time=None, detail_status: str=None, **kwargs) -> None: + super(ContainerState, self).__init__(**kwargs) + self.state = state + self.start_time = start_time + self.exit_code = exit_code + self.finish_time = finish_time + self.detail_status = detail_status diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_volume.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_volume.py new file mode 100644 index 000000000000..47323174239c --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_volume.py @@ -0,0 +1,45 @@ +# 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 ContainerVolume(Model): + """Describes how a volume is attached to a container. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerVolume, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.read_only = kwargs.get('read_only', None) + self.destination_path = kwargs.get('destination_path', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_volume_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_volume_py3.py new file mode 100644 index 000000000000..0ff73ba3b086 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/container_volume_py3.py @@ -0,0 +1,45 @@ +# 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 ContainerVolume(Model): + """Describes how a volume is attached to a container. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + } + + def __init__(self, *, name: str, destination_path: str, read_only: bool=None, **kwargs) -> None: + super(ContainerVolume, self).__init__(**kwargs) + self.name = name + self.read_only = read_only + self.destination_path = destination_path diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_description.py new file mode 100644 index 000000000000..cc2a0ce77d1f --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_description.py @@ -0,0 +1,38 @@ +# 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 DiagnosticsDescription(Model): + """Describes the diagnostics options available. + + :param sinks: List of supported sinks that can be referenced. + :type sinks: + list[~azure.mgmt.servicefabricmesh.models.DiagnosticsSinkProperties] + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param default_sink_refs: The sinks to be used if diagnostics is enabled. + Sink choices can be overridden at the service and code package level. + :type default_sink_refs: list[str] + """ + + _attribute_map = { + 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = kwargs.get('sinks', None) + self.enabled = kwargs.get('enabled', None) + self.default_sink_refs = kwargs.get('default_sink_refs', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_description_py3.py new file mode 100644 index 000000000000..fd5567662e66 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_description_py3.py @@ -0,0 +1,38 @@ +# 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 DiagnosticsDescription(Model): + """Describes the diagnostics options available. + + :param sinks: List of supported sinks that can be referenced. + :type sinks: + list[~azure.mgmt.servicefabricmesh.models.DiagnosticsSinkProperties] + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param default_sink_refs: The sinks to be used if diagnostics is enabled. + Sink choices can be overridden at the service and code package level. + :type default_sink_refs: list[str] + """ + + _attribute_map = { + 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + } + + def __init__(self, *, sinks=None, enabled: bool=None, default_sink_refs=None, **kwargs) -> None: + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = sinks + self.enabled = enabled + self.default_sink_refs = default_sink_refs diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_ref.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_ref.py new file mode 100644 index 000000000000..3d4c803cac28 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_ref.py @@ -0,0 +1,33 @@ +# 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 DiagnosticsRef(Model): + """Reference to sinks in DiagnosticsDescription. + + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param sink_refs: List of sinks to be used if enabled. References the list + of sinks in DiagnosticsDescription. + :type sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.sink_refs = kwargs.get('sink_refs', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_ref_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_ref_py3.py new file mode 100644 index 000000000000..f11fbf2b40d2 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_ref_py3.py @@ -0,0 +1,33 @@ +# 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 DiagnosticsRef(Model): + """Reference to sinks in DiagnosticsDescription. + + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param sink_refs: List of sinks to be used if enabled. References the list + of sinks in DiagnosticsDescription. + :type sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__(self, *, enabled: bool=None, sink_refs=None, **kwargs) -> None: + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = enabled + self.sink_refs = sink_refs diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_sink_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_sink_properties.py new file mode 100644 index 000000000000..63da00fe00b8 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_sink_properties.py @@ -0,0 +1,50 @@ +# 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 DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__(self, **kwargs): + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_sink_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_sink_properties_py3.py new file mode 100644 index 000000000000..123512a45456 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/diagnostics_sink_properties_py3.py @@ -0,0 +1,50 @@ +# 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 DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.name = name + self.description = description + self.kind = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/endpoint_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/endpoint_properties.py new file mode 100644 index 000000000000..fe53d35ee902 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/endpoint_properties.py @@ -0,0 +1,38 @@ +# 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 EndpointProperties(Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. + :type name: str + :param port: Port used by the container. + :type port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(EndpointProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/endpoint_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/endpoint_properties_py3.py new file mode 100644 index 000000000000..d61442506a61 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/endpoint_properties_py3.py @@ -0,0 +1,38 @@ +# 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 EndpointProperties(Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. + :type name: str + :param port: Port used by the container. + :type port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, name: str, port: int=None, **kwargs) -> None: + super(EndpointProperties, self).__init__(**kwargs) + self.name = name + self.port = port diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/environment_variable.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/environment_variable.py new file mode 100644 index 000000000000..0e61588e7c86 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/environment_variable.py @@ -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 EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentVariable, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/environment_variable_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/environment_variable_py3.py new file mode 100644 index 000000000000..a91fdc50ebbd --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/environment_variable_py3.py @@ -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 EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(EnvironmentVariable, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/error_model.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/error_model.py new file mode 100644 index 000000000000..5090e6311ce2 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/error_model.py @@ -0,0 +1,45 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class ErrorModel(Model): + """The error details. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorModel, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorModelException(HttpOperationError): + """Server responsed with exception of type: 'ErrorModel'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorModelException, self).__init__(deserialize, response, 'ErrorModel', *args) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/error_model_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/error_model_py3.py new file mode 100644 index 000000000000..f62ee7de354d --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/error_model_py3.py @@ -0,0 +1,45 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class ErrorModel(Model): + """The error details. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorModel, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorModelException(HttpOperationError): + """Server responsed with exception of type: 'ErrorModel'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorModelException, self).__init__(deserialize, response, 'ErrorModel', *args) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/image_registry_credential.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/image_registry_credential.py new file mode 100644 index 000000000000..4a31577dad55 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/image_registry_credential.py @@ -0,0 +1,44 @@ +# 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 ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. Docker image registry server, without protocol + such as `http` and `https`. + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password: The password for the private registry. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/image_registry_credential_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/image_registry_credential_py3.py new file mode 100644 index 000000000000..d189db0f0041 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/image_registry_credential_py3.py @@ -0,0 +1,44 @@ +# 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 ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. Docker image registry server, without protocol + such as `http` and `https`. + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password: The password for the private registry. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, server: str, username: str, password: str=None, **kwargs) -> None: + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = server + self.username = username + self.password = password diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/ingress_config.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/ingress_config.py new file mode 100644 index 000000000000..ddde38d1d73a --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/ingress_config.py @@ -0,0 +1,47 @@ +# 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 IngressConfig(Model): + """Describes public connectivity configuration for the network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param qos_level: The QoS tier for ingress. Possible values include: + 'Bronze' + :type qos_level: str or + ~azure.mgmt.servicefabricmesh.models.IngressQoSLevel + :param layer4: Configuration for layer4 public connectivity for this + network. + :type layer4: + list[~azure.mgmt.servicefabricmesh.models.Layer4IngressConfig] + :ivar public_ip_address: The public IP address for reaching this network. + :vartype public_ip_address: str + """ + + _validation = { + 'public_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'qos_level': {'key': 'qosLevel', 'type': 'str'}, + 'layer4': {'key': 'layer4', 'type': '[Layer4IngressConfig]'}, + 'public_ip_address': {'key': 'publicIPAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IngressConfig, self).__init__(**kwargs) + self.qos_level = kwargs.get('qos_level', None) + self.layer4 = kwargs.get('layer4', None) + self.public_ip_address = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/ingress_config_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/ingress_config_py3.py new file mode 100644 index 000000000000..7b6eb2b98b85 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/ingress_config_py3.py @@ -0,0 +1,47 @@ +# 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 IngressConfig(Model): + """Describes public connectivity configuration for the network. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param qos_level: The QoS tier for ingress. Possible values include: + 'Bronze' + :type qos_level: str or + ~azure.mgmt.servicefabricmesh.models.IngressQoSLevel + :param layer4: Configuration for layer4 public connectivity for this + network. + :type layer4: + list[~azure.mgmt.servicefabricmesh.models.Layer4IngressConfig] + :ivar public_ip_address: The public IP address for reaching this network. + :vartype public_ip_address: str + """ + + _validation = { + 'public_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'qos_level': {'key': 'qosLevel', 'type': 'str'}, + 'layer4': {'key': 'layer4', 'type': '[Layer4IngressConfig]'}, + 'public_ip_address': {'key': 'publicIPAddress', 'type': 'str'}, + } + + def __init__(self, *, qos_level=None, layer4=None, **kwargs) -> None: + super(IngressConfig, self).__init__(**kwargs) + self.qos_level = qos_level + self.layer4 = layer4 + self.public_ip_address = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/layer4_ingress_config.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/layer4_ingress_config.py new file mode 100644 index 000000000000..c5cc74374e55 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/layer4_ingress_config.py @@ -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 Layer4IngressConfig(Model): + """Describes the layer4 configuration for public connectivity for this + network. + + :param name: Layer4 ingress config name. + :type name: str + :param public_port: Specifies the public port at which the service + endpoint below needs to be exposed. + :type public_port: int + :param application_name: The application name which contains the service + to be exposed. + :type application_name: str + :param service_name: The service whose endpoint needs to be exposed at the + public port. + :type service_name: str + :param endpoint_name: The service endpoint that needs to be exposed. + :type endpoint_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_port': {'key': 'publicPort', 'type': 'int'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Layer4IngressConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.public_port = kwargs.get('public_port', None) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.endpoint_name = kwargs.get('endpoint_name', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/layer4_ingress_config_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/layer4_ingress_config_py3.py new file mode 100644 index 000000000000..3938f53c9236 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/layer4_ingress_config_py3.py @@ -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 Layer4IngressConfig(Model): + """Describes the layer4 configuration for public connectivity for this + network. + + :param name: Layer4 ingress config name. + :type name: str + :param public_port: Specifies the public port at which the service + endpoint below needs to be exposed. + :type public_port: int + :param application_name: The application name which contains the service + to be exposed. + :type application_name: str + :param service_name: The service whose endpoint needs to be exposed at the + public port. + :type service_name: str + :param endpoint_name: The service endpoint that needs to be exposed. + :type endpoint_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_port': {'key': 'publicPort', 'type': 'int'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, public_port: int=None, application_name: str=None, service_name: str=None, endpoint_name: str=None, **kwargs) -> None: + super(Layer4IngressConfig, self).__init__(**kwargs) + self.name = name + self.public_port = public_port + self.application_name = application_name + self.service_name = service_name + self.endpoint_name = endpoint_name diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/managed_proxy_resource.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/managed_proxy_resource.py new file mode 100644 index 000000000000..b711c090c772 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/managed_proxy_resource.py @@ -0,0 +1,49 @@ +# 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 ManagedProxyResource(Model): + """The resource model definition for Azure Resource Manager proxy resource. It + will have everything other than required location and tags. This proxy + resource is explicitly created or updated by including it in the parent + resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :param name: The name of the resource + :type name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedProxyResource, self).__init__(**kwargs) + self.id = None + self.name = kwargs.get('name', None) + self.type = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/managed_proxy_resource_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/managed_proxy_resource_py3.py new file mode 100644 index 000000000000..bdedaed2145e --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/managed_proxy_resource_py3.py @@ -0,0 +1,49 @@ +# 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 ManagedProxyResource(Model): + """The resource model definition for Azure Resource Manager proxy resource. It + will have everything other than required location and tags. This proxy + resource is explicitly created or updated by including it in the parent + resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :param name: The name of the resource + :type name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ManagedProxyResource, self).__init__(**kwargs) + self.id = None + self.name = name + self.type = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_properties.py new file mode 100644 index 000000000000..1f3cc437f542 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_properties.py @@ -0,0 +1,43 @@ +# 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 NetworkProperties(Model): + """Describes a network. + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the network. + :type description: str + :param address_prefix: Required. the address prefix for this network. + :type address_prefix: str + :param ingress_config: Configuration for public connectivity for this + network. + :type ingress_config: ~azure.mgmt.servicefabricmesh.models.IngressConfig + """ + + _validation = { + 'address_prefix': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'ingress_config': {'key': 'ingressConfig', 'type': 'IngressConfig'}, + } + + def __init__(self, **kwargs): + super(NetworkProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.ingress_config = kwargs.get('ingress_config', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_properties_py3.py new file mode 100644 index 000000000000..9bb86d3286ba --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_properties_py3.py @@ -0,0 +1,43 @@ +# 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 NetworkProperties(Model): + """Describes a network. + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the network. + :type description: str + :param address_prefix: Required. the address prefix for this network. + :type address_prefix: str + :param ingress_config: Configuration for public connectivity for this + network. + :type ingress_config: ~azure.mgmt.servicefabricmesh.models.IngressConfig + """ + + _validation = { + 'address_prefix': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'ingress_config': {'key': 'ingressConfig', 'type': 'IngressConfig'}, + } + + def __init__(self, *, address_prefix: str, description: str=None, ingress_config=None, **kwargs) -> None: + super(NetworkProperties, self).__init__(**kwargs) + self.description = description + self.address_prefix = address_prefix + self.ingress_config = ingress_config diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_ref.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_ref.py new file mode 100644 index 000000000000..b86c10253c0f --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_ref.py @@ -0,0 +1,28 @@ +# 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 NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_ref_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_ref_py3.py new file mode 100644 index 000000000000..45e5d333f747 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_ref_py3.py @@ -0,0 +1,28 @@ +# 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 NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(NetworkRef, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description.py new file mode 100644 index 000000000000..0de105055883 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description.py @@ -0,0 +1,71 @@ +# 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 .tracked_resource import TrackedResource + + +class NetworkResourceDescription(TrackedResource): + """This type describes a network resource. + + 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: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + :param description: User readable description of the network. + :type description: str + :param address_prefix: Required. the address prefix for this network. + :type address_prefix: str + :param ingress_config: Configuration for public connectivity for this + network. + :type ingress_config: ~azure.mgmt.servicefabricmesh.models.IngressConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'address_prefix': {'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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'ingress_config': {'key': 'properties.ingressConfig', 'type': 'IngressConfig'}, + } + + def __init__(self, **kwargs): + super(NetworkResourceDescription, self).__init__(**kwargs) + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.ingress_config = kwargs.get('ingress_config', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description_paged.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description_paged.py new file mode 100644 index 000000000000..a6206dbec02c --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class NetworkResourceDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`NetworkResourceDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NetworkResourceDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(NetworkResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description_py3.py new file mode 100644 index 000000000000..05086651bc11 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/network_resource_description_py3.py @@ -0,0 +1,71 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class NetworkResourceDescription(TrackedResource): + """This type describes a network resource. + + 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: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + :param description: User readable description of the network. + :type description: str + :param address_prefix: Required. the address prefix for this network. + :type address_prefix: str + :param ingress_config: Configuration for public connectivity for this + network. + :type ingress_config: ~azure.mgmt.servicefabricmesh.models.IngressConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'address_prefix': {'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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'ingress_config': {'key': 'properties.ingressConfig', 'type': 'IngressConfig'}, + } + + def __init__(self, *, address_prefix: str, location: str=None, tags=None, description: str=None, ingress_config=None, **kwargs) -> None: + super(NetworkResourceDescription, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.description = description + self.address_prefix = address_prefix + self.ingress_config = ingress_config diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result.py new file mode 100644 index 000000000000..6a189eb5b477 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result.py @@ -0,0 +1,41 @@ +# 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 OperationResult(Model): + """List of operations available at the listed Azure resource provider. + + :param name: The name of the operation. + :type name: str + :param display: The object that represents the operation. + :type display: + ~azure.mgmt.servicefabricmesh.models.AvailableOperationDisplay + :param origin: Origin result + :type origin: str + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'AvailableOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result_paged.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result_paged.py new file mode 100644 index 000000000000..b95761b52fd5 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class OperationResultPaged(Paged): + """ + A paging container for iterating over a list of :class:`OperationResult ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OperationResult]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationResultPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result_py3.py new file mode 100644 index 000000000000..d7835928b8cb --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/operation_result_py3.py @@ -0,0 +1,41 @@ +# 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 OperationResult(Model): + """List of operations available at the listed Azure resource provider. + + :param name: The name of the operation. + :type name: str + :param display: The object that represents the operation. + :type display: + ~azure.mgmt.servicefabricmesh.models.AvailableOperationDisplay + :param origin: Origin result + :type origin: str + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'AvailableOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, next_link: str=None, **kwargs) -> None: + super(OperationResult, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.next_link = next_link diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/provisioned_resource_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/provisioned_resource_properties.py new file mode 100644 index 000000000000..ca9e697755e1 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/provisioned_resource_properties.py @@ -0,0 +1,35 @@ +# 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 ProvisionedResourceProperties(Model): + """Describes common properties of a provisioned resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProvisionedResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/provisioned_resource_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/provisioned_resource_properties_py3.py new file mode 100644 index 000000000000..cbdd985153d5 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/provisioned_resource_properties_py3.py @@ -0,0 +1,35 @@ +# 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 ProvisionedResourceProperties(Model): + """Describes common properties of a provisioned resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProvisionedResourceProperties, self).__init__(**kwargs) + self.provisioning_state = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/proxy_resource.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/proxy_resource.py new file mode 100644 index 000000000000..f79f459433a5 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/proxy_resource.py @@ -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 .resource import Resource + + +class ProxyResource(Resource): + """The resource model definition for Azure Resource Manager proxy resource. It + will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: 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'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/proxy_resource_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/proxy_resource_py3.py new file mode 100644 index 000000000000..b718e7600471 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/proxy_resource_py3.py @@ -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 .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for Azure Resource Manager proxy resource. It + will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: 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'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(ProxyResource, self).__init__(location=location, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource.py new file mode 100644 index 000000000000..6d672505625e --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource.py @@ -0,0 +1,51 @@ +# 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 Resource(Model): + """The resource model definition for Azure Resource Manager resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: 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'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_limits.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_limits.py new file mode 100644 index 000000000000..9653965c0df6 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_limits.py @@ -0,0 +1,35 @@ +# 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 ResourceLimits(Model): + """This type describes the resource limits for a given container. It describes + the most amount of resources a container is allowed to use before being + restarted. + + :param memory_in_gb: The memory limit in GB. + :type memory_in_gb: float + :param cpu: CPU limits in cores. At present, only full cores are + supported. + :type cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_limits_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_limits_py3.py new file mode 100644 index 000000000000..2817c55a584a --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_limits_py3.py @@ -0,0 +1,35 @@ +# 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 ResourceLimits(Model): + """This type describes the resource limits for a given container. It describes + the most amount of resources a container is allowed to use before being + restarted. + + :param memory_in_gb: The memory limit in GB. + :type memory_in_gb: float + :param cpu: CPU limits in cores. At present, only full cores are + supported. + :type cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_py3.py new file mode 100644 index 000000000000..02dbe00638e3 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_py3.py @@ -0,0 +1,51 @@ +# 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 Resource(Model): + """The resource model definition for Azure Resource Manager resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: 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'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requests.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requests.py new file mode 100644 index 000000000000..b185f6486271 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requests.py @@ -0,0 +1,46 @@ +# 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 ResourceRequests(Model): + """This type describes the requested resources for a given container. It + describes the least amount of resources required for the container. A + container can consume more than requested resources up to the specified + limits before being restarted. Currently, the requested resources are + treated as limits. + . + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB for this + container. + :type memory_in_gb: float + :param cpu: Required. Requested number of CPU cores. At present, only full + cores are supported. + :type cpu: float + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requests_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requests_py3.py new file mode 100644 index 000000000000..a51aef471c63 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requests_py3.py @@ -0,0 +1,46 @@ +# 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 ResourceRequests(Model): + """This type describes the requested resources for a given container. It + describes the least amount of resources required for the container. A + container can consume more than requested resources up to the specified + limits before being restarted. Currently, the requested resources are + treated as limits. + . + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB for this + container. + :type memory_in_gb: float + :param cpu: Required. Requested number of CPU cores. At present, only full + cores are supported. + :type cpu: float + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requirements.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requirements.py new file mode 100644 index 000000000000..75e05be2e313 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requirements.py @@ -0,0 +1,40 @@ +# 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 ResourceRequirements(Model): + """This type describes the resource requirements for a container or a service. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. Describes the requested resources for a given + container. + :type requests: ~azure.mgmt.servicefabricmesh.models.ResourceRequests + :param limits: Describes the maximum limits on the resources for a given + container. + :type limits: ~azure.mgmt.servicefabricmesh.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, **kwargs): + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.limits = kwargs.get('limits', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requirements_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requirements_py3.py new file mode 100644 index 000000000000..ed924f3f0a76 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/resource_requirements_py3.py @@ -0,0 +1,40 @@ +# 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 ResourceRequirements(Model): + """This type describes the resource requirements for a container or a service. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. Describes the requested resources for a given + container. + :type requests: ~azure.mgmt.servicefabricmesh.models.ResourceRequests + :param limits: Describes the maximum limits on the resources for a given + container. + :type limits: ~azure.mgmt.servicefabricmesh.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, *, requests, limits=None, **kwargs) -> None: + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = requests + self.limits = limits diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_fabric_mesh_management_client_enums.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_fabric_mesh_management_client_enums.py new file mode 100644 index 000000000000..6d26f0419acd --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_fabric_mesh_management_client_enums.py @@ -0,0 +1,58 @@ +# 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 enum import Enum + + +class IngressQoSLevel(str, Enum): + + bronze = "Bronze" + + +class HealthState(str, Enum): + + invalid = "Invalid" #: Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The value is zero. + ok = "Ok" #: Indicates the health state is okay. The value is 1. + warning = "Warning" #: Indicates the health state is at a warning level. The value is 2. + error = "Error" #: Indicates the health state is at an error level. Error health state should be investigated, as they can impact the correct functionality of the cluster. The value is 3. + unknown = "Unknown" #: Indicates an unknown health status. The value is 65535. + + +class ServiceResourceStatus(str, Enum): + + unknown = "Unknown" + active = "Active" + upgrading = "Upgrading" + deleting = "Deleting" + creating = "Creating" + failed = "Failed" + + +class ApplicationResourceStatus(str, Enum): + + invalid = "Invalid" + ready = "Ready" + upgrading = "Upgrading" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" + + +class OperatingSystemTypes(str, Enum): + + linux = "Linux" + windows = "Windows" + + +class DiagnosticsSinkKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid sink kind. All Service Fabric enumerations have the invalid type. + azure_internal_monitoring_pipeline = "AzureInternalMonitoringPipeline" #: Diagnostics settings for Geneva. diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description.py new file mode 100644 index 000000000000..435f4b41f1fc --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description.py @@ -0,0 +1,55 @@ +# 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 .service_replica_properties import ServiceReplicaProperties + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """This type describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The Operating system type required by the code + in service. + . Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.servicefabricmesh.models.OperatingSystemTypes + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + :param replica_name: Name of the replica. + :type replica_name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'replica_name': {'key': 'replicaName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceReplicaDescription, self).__init__(**kwargs) + self.replica_name = kwargs.get('replica_name', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description_paged.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description_paged.py new file mode 100644 index 000000000000..21e8c05cea54 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class ServiceReplicaDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceReplicaDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceReplicaDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceReplicaDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description_py3.py new file mode 100644 index 000000000000..04a0e3014f28 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_description_py3.py @@ -0,0 +1,55 @@ +# 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 .service_replica_properties_py3 import ServiceReplicaProperties + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """This type describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The Operating system type required by the code + in service. + . Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.servicefabricmesh.models.OperatingSystemTypes + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + :param replica_name: Name of the replica. + :type replica_name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'replica_name': {'key': 'replicaName', 'type': 'str'}, + } + + def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, replica_name: str=None, **kwargs) -> None: + super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) + self.replica_name = replica_name diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_properties.py new file mode 100644 index 000000000000..45eca27919b8 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_properties.py @@ -0,0 +1,55 @@ +# 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 ServiceReplicaProperties(Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The Operating system type required by the code + in service. + . Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.servicefabricmesh.models.OperatingSystemTypes + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, **kwargs): + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.code_packages = kwargs.get('code_packages', None) + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_properties_py3.py new file mode 100644 index 000000000000..eb49bea5f9ac --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_replica_properties_py3.py @@ -0,0 +1,55 @@ +# 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 ServiceReplicaProperties(Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The Operating system type required by the code + in service. + . Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.servicefabricmesh.models.OperatingSystemTypes + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, **kwargs) -> None: + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description.py new file mode 100644 index 000000000000..08d88d7a2d5f --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description.py @@ -0,0 +1,95 @@ +# 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 .managed_proxy_resource import ManagedProxyResource + + +class ServiceResourceDescription(ManagedProxyResource): + """This type describes a service resource. + + 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: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :param name: The name of the resource + :type name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param os_type: Required. The Operating system type required by the code + in service. + . Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.servicefabricmesh.models.OperatingSystemTypes + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param health_state: The health state of a resource such as Application, + Service, or Network. Possible values include: 'Invalid', 'Ok', 'Warning', + 'Error', 'Unknown' + :type health_state: str or + ~azure.mgmt.servicefabricmesh.models.HealthState + :ivar status: Represents the status of the service. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :vartype status: str or + ~azure.mgmt.servicefabricmesh.models.ServiceResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceResourceDescription, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.code_packages = kwargs.get('code_packages', None) + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.health_state = kwargs.get('health_state', None) + self.status = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description_paged.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description_paged.py new file mode 100644 index 000000000000..c0faa1ff3522 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class ServiceResourceDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceResourceDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceResourceDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description_py3.py new file mode 100644 index 000000000000..485504089396 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/service_resource_description_py3.py @@ -0,0 +1,95 @@ +# 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 .managed_proxy_resource_py3 import ManagedProxyResource + + +class ServiceResourceDescription(ManagedProxyResource): + """This type describes a service resource. + + 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: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :param name: The name of the resource + :type name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param os_type: Required. The Operating system type required by the code + in service. + . Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.servicefabricmesh.models.OperatingSystemTypes + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.mgmt.servicefabricmesh.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.mgmt.servicefabricmesh.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.mgmt.servicefabricmesh.models.DiagnosticsRef + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param health_state: The health state of a resource such as Application, + Service, or Network. Possible values include: 'Invalid', 'Ok', 'Warning', + 'Error', 'Unknown' + :type health_state: str or + ~azure.mgmt.servicefabricmesh.models.HealthState + :ivar status: Represents the status of the service. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :vartype status: str or + ~azure.mgmt.servicefabricmesh.models.ServiceResourceStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, os_type, code_packages, name: str=None, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, health_state=None, **kwargs) -> None: + super(ServiceResourceDescription, self).__init__(name=name, **kwargs) + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics + self.description = description + self.replica_count = replica_count + self.health_state = health_state + self.status = None diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/setting.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/setting.py new file mode 100644 index 000000000000..23fc418e0bec --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/setting.py @@ -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 Setting(Model): + """Describes a setting for the container. + + :param name: The name of the setting. + :type name: str + :param value: The value of the setting. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/setting_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/setting_py3.py new file mode 100644 index 000000000000..1a042b3d640e --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/setting_py3.py @@ -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 Setting(Model): + """Describes a setting for the container. + + :param name: The name of the setting. + :type name: str + :param value: The value of the setting. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(Setting, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/tracked_resource.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/tracked_resource.py new file mode 100644 index 000000000000..e99f4af7b155 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/tracked_resource.py @@ -0,0 +1,52 @@ +# 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 .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for Azure Resource Manager tracked top-level + resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param 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(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/tracked_resource_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/tracked_resource_py3.py new file mode 100644 index 000000000000..a197cf982d82 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/tracked_resource_py3.py @@ -0,0 +1,52 @@ +# 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 .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for Azure Resource Manager tracked top-level + resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param 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, *, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(location=location, **kwargs) + self.tags = tags diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_properties.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_properties.py new file mode 100644 index 000000000000..2059f7b90a83 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_properties.py @@ -0,0 +1,49 @@ +# 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 VolumeProperties(Model): + """This type describes properties of a volume resource. + + 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. + + :param description: User readable description of the volume. + :type description: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.mgmt.servicefabricmesh.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'provider': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, **kwargs): + super(VolumeProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.azure_file_parameters = kwargs.get('azure_file_parameters', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_properties_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_properties_py3.py new file mode 100644 index 000000000000..236294853200 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_properties_py3.py @@ -0,0 +1,49 @@ +# 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 VolumeProperties(Model): + """This type describes properties of a volume resource. + + 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. + + :param description: User readable description of the volume. + :type description: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.mgmt.servicefabricmesh.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'provider': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, *, description: str=None, azure_file_parameters=None, **kwargs) -> None: + super(VolumeProperties, self).__init__(**kwargs) + self.description = description + self.azure_file_parameters = azure_file_parameters diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file.py new file mode 100644 index 000000000000..c10943e94cf4 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file.py @@ -0,0 +1,46 @@ +# 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 VolumeProviderParametersAzureFile(Model): + """This type describes a volume provided by an Azure Files file share. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Name of the Azure storage account for the + File Share. + :type account_name: str + :param account_key: Access key of the Azure storage account for the File + Share. + :type account_key: str + :param share_name: Required. Name of the Azure Files file share that + provides storage for the volume. + :type share_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.account_key = kwargs.get('account_key', None) + self.share_name = kwargs.get('share_name', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file_py3.py new file mode 100644 index 000000000000..c8fea05b1ef8 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_provider_parameters_azure_file_py3.py @@ -0,0 +1,46 @@ +# 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 VolumeProviderParametersAzureFile(Model): + """This type describes a volume provided by an Azure Files file share. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Name of the Azure storage account for the + File Share. + :type account_name: str + :param account_key: Access key of the Azure storage account for the File + Share. + :type account_key: str + :param share_name: Required. Name of the Azure Files file share that + provides storage for the volume. + :type share_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, share_name: str, account_key: str=None, **kwargs) -> None: + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = account_name + self.account_key = account_key + self.share_name = share_name diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description.py new file mode 100644 index 000000000000..9657ea569f83 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description.py @@ -0,0 +1,74 @@ +# 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 .tracked_resource import TrackedResource + + +class VolumeResourceDescription(TrackedResource): + """This type describes a volume resource. + + 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: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + :param description: User readable description of the volume. + :type description: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.mgmt.servicefabricmesh.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provider': {'required': True, 'constant': 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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, **kwargs): + super(VolumeResourceDescription, self).__init__(**kwargs) + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.azure_file_parameters = kwargs.get('azure_file_parameters', None) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description_paged.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description_paged.py new file mode 100644 index 000000000000..606c2f28f7ee --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class VolumeResourceDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`VolumeResourceDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VolumeResourceDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(VolumeResourceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description_py3.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description_py3.py new file mode 100644 index 000000000000..8400609a36f6 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/models/volume_resource_description_py3.py @@ -0,0 +1,74 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class VolumeResourceDescription(TrackedResource): + """This type describes a volume resource. + + 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: Fully qualified identifier for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param location: The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: State of the resource. + :vartype provisioning_state: str + :param description: User readable description of the volume. + :type description: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.mgmt.servicefabricmesh.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provider': {'required': True, 'constant': 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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, *, location: str=None, tags=None, description: str=None, azure_file_parameters=None, **kwargs) -> None: + super(VolumeResourceDescription, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.description = description + self.azure_file_parameters = azure_file_parameters diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/__init__.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/__init__.py new file mode 100644 index 000000000000..96ea0a9e4078 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/__init__.py @@ -0,0 +1,28 @@ +# 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 .application_operations import ApplicationOperations +from .service_operations import ServiceOperations +from .replica_operations import ReplicaOperations +from .code_package_operations import CodePackageOperations +from .operations import Operations +from .network_operations import NetworkOperations +from .volume_operations import VolumeOperations + +__all__ = [ + 'ApplicationOperations', + 'ServiceOperations', + 'ReplicaOperations', + 'CodePackageOperations', + 'Operations', + 'NetworkOperations', + 'VolumeOperations', +] diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/application_operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/application_operations.py new file mode 100644 index 000000000000..13e94b0ca1d6 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/application_operations.py @@ -0,0 +1,378 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ApplicationOperations(object): + """ApplicationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def create( + self, resource_group_name, application_name, application_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates an application resource. + + Creates an application resource with the specified name and + description. If an application with the same name already exists, then + its description is updated to the one indicated in this request. + Use network resources to provide public connectivity to the services of + an application. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param application_resource_description: Description for creating an + application resource. + :type application_resource_description: + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationResourceDescription or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('ApplicationResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}'} + + def get( + self, resource_group_name, application_name, custom_headers=None, raw=False, **operation_config): + """Gets the application resource. + + Gets the information about the application resource with a given name. + The information includes the information about the application's + services and other runtime properties. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationResourceDescription or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}'} + + def delete( + self, resource_group_name, application_name, custom_headers=None, raw=False, **operation_config): + """Deletes the application resource. + + Deletes the application resource identified by the name. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorModelException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the application resources in a given resource group. + + Gets the information about all application resources in a given + resource group. The information includes the information about the + application's services and other runtime properties. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the application resources in a given subscription. + + Gets the information about all application resources in a given + subscription. The information includes the information about the + application's services and other runtime properties. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ApplicationResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ApplicationResourceDescription] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ApplicationResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/applications'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/code_package_operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/code_package_operations.py new file mode 100644 index 000000000000..c5f5648a5b93 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/code_package_operations.py @@ -0,0 +1,115 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CodePackageOperations(object): + """CodePackageOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def get_container_log( + self, resource_group_name, application_name, service_name, replica_name, code_package_name, tail=None, custom_headers=None, raw=False, **operation_config): + """Gets the logs for the container. + + Get the logs for the container of a given code package of an + application. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param service_name: The identity of the service. + :type service_name: str + :param replica_name: The identity of the service replica. + :type replica_name: str + :param code_package_name: The name of the code package. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default + is 100. + :type tail: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContainerLogs or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicefabricmesh.models.ContainerLogs or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.get_container_log.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True), + 'serviceName': self._serialize.url("service_name", service_name, 'str', skip_quote=True), + 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True), + 'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if tail is not None: + query_parameters['tail'] = self._serialize.query("tail", tail, 'int') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ContainerLogs', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas/{replicaName}/codePackages/{codePackageName}/logs'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/network_operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/network_operations.py new file mode 100644 index 000000000000..50258fda957b --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/network_operations.py @@ -0,0 +1,378 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class NetworkOperations(object): + """NetworkOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def create( + self, resource_group_name, network_name, network_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates a network resource. + + Creates a network resource with the specified name and description. If + a network with the same name already exists, then its description is + updated to the one indicated in this request. + Use network resources to create private network and configure public + connectivity for services within your application. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param network_name: The identity of the network. + :type network_name: str + :param network_resource_description: Description for creating a + network resource. + :type network_resource_description: + ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkResourceDescription or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkName': self._serialize.url("network_name", network_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NetworkResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('NetworkResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}'} + + def get( + self, resource_group_name, network_name, custom_headers=None, raw=False, **operation_config): + """Gets the network resource. + + Gets the information about the network resource with a given name. This + information includes the network description and other runtime + information. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param network_name: The identity of the network. + :type network_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkResourceDescription or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkName': self._serialize.url("network_name", network_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NetworkResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}'} + + def delete( + self, resource_group_name, network_name, custom_headers=None, raw=False, **operation_config): + """Deletes the network resource. + + Deletes the network resource identified by the name. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param network_name: The identity of the network. + :type network_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkName': self._serialize.url("network_name", network_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorModelException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the network resources in a given resource group. + + Gets the information about all network resources in a given resource + group. The information includes the network description and other + runtime properties. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NetworkResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the network resources in a given subscription. + + Gets the information about all network resources in a given + subscription. The information includes the network description and + other runtime properties. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NetworkResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.NetworkResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.NetworkResourceDescription] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.NetworkResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/networks'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/operations.py new file mode 100644 index 000000000000..178231012759 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/operations.py @@ -0,0 +1,100 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available operations. + + Lists all the available operations provided by Service Fabric SeaBreeze + resource provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OperationResult + :rtype: + ~azure.mgmt.servicefabricmesh.models.OperationResultPaged[~azure.mgmt.servicefabricmesh.models.OperationResult] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationResultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationResultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ServiceFabricMesh/operations'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/replica_operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/replica_operations.py new file mode 100644 index 000000000000..664077f256df --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/replica_operations.py @@ -0,0 +1,188 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ReplicaOperations(object): + """ReplicaOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list_by_service_name( + self, resource_group_name, application_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets replicas of a given service. + + Gets the information about all replicas of a given service of an + application. The information includes the runtime properties of the + replica instance. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param service_name: The identity of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceReplicaDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_service_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True), + 'serviceName': self._serialize.url("service_name", service_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServiceReplicaDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServiceReplicaDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_service_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas'} + + def get( + self, resource_group_name, application_name, service_name, replica_name, custom_headers=None, raw=False, **operation_config): + """Gets a specific replica of a given service. + + Gets the information about the specified replica of a given service of + an application. The information includes the runtime properties of the + replica instance. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param service_name: The identity of the service. + :type service_name: str + :param replica_name: The identity of the service replica. + :type replica_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceReplicaDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicefabricmesh.models.ServiceReplicaDescription + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True), + 'serviceName': self._serialize.url("service_name", service_name, 'str', skip_quote=True), + 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceReplicaDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas/{replicaName}'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/service_operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/service_operations.py new file mode 100644 index 000000000000..14f3c650d7cb --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/service_operations.py @@ -0,0 +1,181 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServiceOperations(object): + """ServiceOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list_by_application_name( + self, resource_group_name, application_name, custom_headers=None, raw=False, **operation_config): + """Gets services of a given application. + + Gets the information about all services of a given service of an + application. The information includes the runtime properties of the + service instance. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.ServiceResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_application_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ServiceResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServiceResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_application_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services'} + + def get( + self, resource_group_name, application_name, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the service. + + The operation returns the properties of the service. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param application_name: The identity of the application. + :type application_name: str + :param service_name: The identity of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceResourceDescription or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.servicefabricmesh.models.ServiceResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationName': self._serialize.url("application_name", application_name, 'str', skip_quote=True), + 'serviceName': self._serialize.url("service_name", service_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/volume_operations.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/volume_operations.py new file mode 100644 index 000000000000..ac3c7bad2133 --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/operations/volume_operations.py @@ -0,0 +1,375 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class VolumeOperations(object): + """VolumeOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be `2018-07-01-preview`. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def create( + self, resource_group_name, volume_name, volume_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates a volume resource. + + Creates a volume resource with the specified name and description. If a + volume with the same name already exists, then its description is + updated to the one indicated in this request. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param volume_name: The identity of the volume. + :type volume_name: str + :param volume_resource_description: Description for creating a volume + resource. + :type volume_resource_description: + ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VolumeResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VolumeResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('VolumeResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}'} + + def get( + self, resource_group_name, volume_name, custom_headers=None, raw=False, **operation_config): + """Gets the volume resource. + + Gets the information about the volume resource with a given name. This + information includes the volume description and other runtime + information. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param volume_name: The identity of the volume. + :type volume_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VolumeResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VolumeResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}'} + + def delete( + self, resource_group_name, volume_name, custom_headers=None, raw=False, **operation_config): + """Deletes the volume resource. + + Deletes the volume identified by the name. + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param volume_name: The identity of the volume. + :type volume_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorModelException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets all the volume resources in a given resource group. + + Gets the information about all volume resources in a given resource + group. The information includes the volume description and other + runtime information. + . + + :param resource_group_name: Azure resource group name + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VolumeResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Gets all the volume resources in a given subscription. + + Gets the information about all volume resources in a given + subscription. The information includes the volume description and other + runtime information. + . + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VolumeResourceDescription + :rtype: + ~azure.mgmt.servicefabricmesh.models.VolumeResourceDescriptionPaged[~azure.mgmt.servicefabricmesh.models.VolumeResourceDescription] + :raises: + :class:`ErrorModelException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VolumeResourceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/volumes'} diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/service_fabric_mesh_management_client.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/service_fabric_mesh_management_client.py new file mode 100644 index 000000000000..df5285b1a9ec --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/service_fabric_mesh_management_client.py @@ -0,0 +1,111 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.application_operations import ApplicationOperations +from .operations.service_operations import ServiceOperations +from .operations.replica_operations import ReplicaOperations +from .operations.code_package_operations import CodePackageOperations +from .operations.operations import Operations +from .operations.network_operations import NetworkOperations +from .operations.volume_operations import VolumeOperations +from . import models + + +class ServiceFabricMeshManagementClientConfiguration(AzureConfiguration): + """Configuration for ServiceFabricMeshManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The customer subscription identifier + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ServiceFabricMeshManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-servicefabricmesh/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class ServiceFabricMeshManagementClient(SDKClient): + """Service Fabric Mesh Management Client + + :ivar config: Configuration for client. + :vartype config: ServiceFabricMeshManagementClientConfiguration + + :ivar application: Application operations + :vartype application: azure.mgmt.servicefabricmesh.operations.ApplicationOperations + :ivar service: Service operations + :vartype service: azure.mgmt.servicefabricmesh.operations.ServiceOperations + :ivar replica: Replica operations + :vartype replica: azure.mgmt.servicefabricmesh.operations.ReplicaOperations + :ivar code_package: CodePackage operations + :vartype code_package: azure.mgmt.servicefabricmesh.operations.CodePackageOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.servicefabricmesh.operations.Operations + :ivar network: Network operations + :vartype network: azure.mgmt.servicefabricmesh.operations.NetworkOperations + :ivar volume: Volume operations + :vartype volume: azure.mgmt.servicefabricmesh.operations.VolumeOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The customer subscription identifier + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ServiceFabricMeshManagementClientConfiguration(credentials, subscription_id, base_url) + super(ServiceFabricMeshManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-07-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.application = ApplicationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.replica = ReplicaOperations( + self._client, self.config, self._serialize, self._deserialize) + self.code_package = CodePackageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.network = NetworkOperations( + self._client, self.config, self._serialize, self._deserialize) + self.volume = VolumeOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/version.py b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/version.py new file mode 100644 index 000000000000..640f86d33a0d --- /dev/null +++ b/azure-mgmt-servicefabricmesh/azure/mgmt/servicefabricmesh/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2018-07-01-preview" +