Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azureactivedirectory/resource-manager] chore: jsonfmt azureactivedirectory #5820

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions sdk/azure-mgmt/azureactivedirectory/__init__.py
Original file line number Diff line number Diff line change
@@ -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 .azureactivedirectory_client import azureactivedirectoryClient
from .version import VERSION

__all__ = ['azureactivedirectoryClient']

__version__ = VERSION

84 changes: 84 additions & 0 deletions sdk/azure-mgmt/azureactivedirectory/azureactivedirectory_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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.operations import Operations
from .operations.diagnostic_settings_operations import DiagnosticSettingsOperations
from .operations.diagnostic_settings_category_operations import DiagnosticSettingsCategoryOperations
from . import models


class azureactivedirectoryClientConfiguration(AzureConfiguration):
"""Configuration for azureactivedirectoryClient
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<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""

def __init__(
self, credentials, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(azureactivedirectoryClientConfiguration, self).__init__(base_url)

self.add_user_agent('azureactivedirectory/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials


class azureactivedirectoryClient(SDKClient):
"""Azure Active Directory Client.

:ivar config: Configuration for client.
:vartype config: azureactivedirectoryClientConfiguration

:ivar operations: Operations operations
:vartype operations: microsoft.aadiam.operations.Operations
:ivar diagnostic_settings: DiagnosticSettings operations
:vartype diagnostic_settings: microsoft.aadiam.operations.DiagnosticSettingsOperations
:ivar diagnostic_settings_category: DiagnosticSettingsCategory operations
:vartype diagnostic_settings_category: microsoft.aadiam.operations.DiagnosticSettingsCategoryOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""

def __init__(
self, credentials, base_url=None):

self.config = azureactivedirectoryClientConfiguration(credentials, base_url)
super(azureactivedirectoryClient, 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 = '2017-04-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.diagnostic_settings = DiagnosticSettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.diagnostic_settings_category = DiagnosticSettingsCategoryOperations(
self._client, self.config, self._serialize, self._deserialize)
58 changes: 58 additions & 0 deletions sdk/azure-mgmt/azureactivedirectory/models/__init__.py
Original file line number Diff line number Diff line change
@@ -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.
# --------------------------------------------------------------------------

try:
from .proxy_only_resource_py3 import ProxyOnlyResource
from .retention_policy_py3 import RetentionPolicy
from .log_settings_py3 import LogSettings
from .diagnostic_settings_resource_py3 import DiagnosticSettingsResource
from .diagnostic_settings_resource_collection_py3 import DiagnosticSettingsResourceCollection
from .error_definition_py3 import ErrorDefinition
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .display_py3 import Display
from .operations_discovery_py3 import OperationsDiscovery
from .operations_discovery_collection_py3 import OperationsDiscoveryCollection
from .diagnostic_settings_category_resource_py3 import DiagnosticSettingsCategoryResource
from .diagnostic_settings_category_resource_collection_py3 import DiagnosticSettingsCategoryResourceCollection
except (SyntaxError, ImportError):
from .proxy_only_resource import ProxyOnlyResource
from .retention_policy import RetentionPolicy
from .log_settings import LogSettings
from .diagnostic_settings_resource import DiagnosticSettingsResource
from .diagnostic_settings_resource_collection import DiagnosticSettingsResourceCollection
from .error_definition import ErrorDefinition
from .error_response import ErrorResponse, ErrorResponseException
from .display import Display
from .operations_discovery import OperationsDiscovery
from .operations_discovery_collection import OperationsDiscoveryCollection
from .diagnostic_settings_category_resource import DiagnosticSettingsCategoryResource
from .diagnostic_settings_category_resource_collection import DiagnosticSettingsCategoryResourceCollection
from .azureactivedirectory_client_enums import (
Category,
CategoryType,
)

__all__ = [
'ProxyOnlyResource',
'RetentionPolicy',
'LogSettings',
'DiagnosticSettingsResource',
'DiagnosticSettingsResourceCollection',
'ErrorDefinition',
'ErrorResponse', 'ErrorResponseException',
'Display',
'OperationsDiscovery',
'OperationsDiscoveryCollection',
'DiagnosticSettingsCategoryResource',
'DiagnosticSettingsCategoryResourceCollection',
'Category',
'CategoryType',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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 Category(str, Enum):

audit_logs = "AuditLogs"
sign_in_logs = "SignInLogs"


class CategoryType(str, Enum):

logs = "Logs"
Original file line number Diff line number Diff line change
@@ -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 .proxy_only_resource import ProxyOnlyResource


class DiagnosticSettingsCategoryResource(ProxyOnlyResource):
"""The diagnostic settings category resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Azure resource Id
:vartype id: str
:ivar name: Azure resource name
:vartype name: str
:ivar type: Azure resource type
:vartype type: str
:param category_type: The type of the diagnostic settings category.
Possible values include: 'Logs'
:type category_type: str or ~microsoft.aadiam.models.CategoryType
"""

_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'},
'category_type': {'key': 'properties.categoryType', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DiagnosticSettingsCategoryResource, self).__init__(**kwargs)
self.category_type = kwargs.get('category_type', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 DiagnosticSettingsCategoryResourceCollection(Model):
"""Represents a collection of diagnostic setting category resources.

:param value: The collection of diagnostic settings category resources.
:type value:
list[~microsoft.aadiam.models.DiagnosticSettingsCategoryResource]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'},
}

def __init__(self, **kwargs):
super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 DiagnosticSettingsCategoryResourceCollection(Model):
"""Represents a collection of diagnostic setting category resources.

:param value: The collection of diagnostic settings category resources.
:type value:
list[~microsoft.aadiam.models.DiagnosticSettingsCategoryResource]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'},
}

def __init__(self, *, value=None, **kwargs) -> None:
super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs)
self.value = value
Original file line number Diff line number Diff line change
@@ -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 .proxy_only_resource_py3 import ProxyOnlyResource


class DiagnosticSettingsCategoryResource(ProxyOnlyResource):
"""The diagnostic settings category resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Azure resource Id
:vartype id: str
:ivar name: Azure resource name
:vartype name: str
:ivar type: Azure resource type
:vartype type: str
:param category_type: The type of the diagnostic settings category.
Possible values include: 'Logs'
:type category_type: str or ~microsoft.aadiam.models.CategoryType
"""

_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'},
'category_type': {'key': 'properties.categoryType', 'type': 'str'},
}

def __init__(self, *, category_type=None, **kwargs) -> None:
super(DiagnosticSettingsCategoryResource, self).__init__(**kwargs)
self.category_type = category_type
Loading