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

[ReleasePR azure-mgmt-blockchain] update-typescript.md #15671

Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import BlockchainManagementClientConfiguration
from ._blockchain_management_client import BlockchainManagementClient
__all__ = ['BlockchainManagementClient', 'BlockchainManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 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 ._configuration import BlockchainManagementClientConfiguration
from .operations import BlockchainMembersOperations
from .operations import BlockchainMemberOperationResultsOperations
from .operations import LocationsOperations
from .operations import Operations
from .operations import SkusOperations
from .operations import TransactionNodesOperations
from . import models


class BlockchainManagementClient(SDKClient):
"""REST API for Azure Blockchain Service

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

:ivar blockchain_members: BlockchainMembers operations
:vartype blockchain_members: azure.mgmt.blockchain.operations.BlockchainMembersOperations
:ivar blockchain_member_operation_results: BlockchainMemberOperationResults operations
:vartype blockchain_member_operation_results: azure.mgmt.blockchain.operations.BlockchainMemberOperationResultsOperations
:ivar locations: Locations operations
:vartype locations: azure.mgmt.blockchain.operations.LocationsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.blockchain.operations.Operations
:ivar skus: Skus operations
:vartype skus: azure.mgmt.blockchain.operations.SkusOperations
:ivar transaction_nodes: TransactionNodes operations
:vartype transaction_nodes: azure.mgmt.blockchain.operations.TransactionNodesOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Gets the subscription Id which uniquely identifies
the Microsoft Azure subscription. The subscription ID is part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = BlockchainManagementClientConfiguration(credentials, subscription_id, base_url)
super(BlockchainManagementClient, 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-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.blockchain_members = BlockchainMembersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.blockchain_member_operation_results = BlockchainMemberOperationResultsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.locations = LocationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.skus = SkusOperations(
self._client, self.config, self._serialize, self._deserialize)
self.transaction_nodes = TransactionNodesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -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 msrestazure import AzureConfiguration

from .version import VERSION


class BlockchainManagementClientConfiguration(AzureConfiguration):
"""Configuration for BlockchainManagementClient
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 subscription_id: Gets the subscription Id which uniquely identifies
the Microsoft Azure subscription. The subscription ID is part of the URI
for every service call.
: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(BlockchainManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

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

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -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.
# --------------------------------------------------------------------------

try:
from ._models_py3 import ApiKey
from ._models_py3 import ApiKeyCollection
from ._models_py3 import BlockchainMember
from ._models_py3 import BlockchainMemberNodesSku
from ._models_py3 import BlockchainMemberUpdate
from ._models_py3 import Consortium
from ._models_py3 import ConsortiumCollection
from ._models_py3 import ConsortiumMember
from ._models_py3 import FirewallRule
from ._models_py3 import NameAvailability
from ._models_py3 import NameAvailabilityRequest
from ._models_py3 import OperationResult
from ._models_py3 import Resource
from ._models_py3 import ResourceProviderOperation
from ._models_py3 import ResourceProviderOperationDisplay
from ._models_py3 import ResourceTypeSku
from ._models_py3 import ResourceTypeSkuCollection
from ._models_py3 import Sku
from ._models_py3 import SkuSetting
from ._models_py3 import TrackedResource
from ._models_py3 import TransactionNode
from ._models_py3 import TransactionNodeUpdate
except (SyntaxError, ImportError):
from ._models import ApiKey
from ._models import ApiKeyCollection
from ._models import BlockchainMember
from ._models import BlockchainMemberNodesSku
from ._models import BlockchainMemberUpdate
from ._models import Consortium
from ._models import ConsortiumCollection
from ._models import ConsortiumMember
from ._models import FirewallRule
from ._models import NameAvailability
from ._models import NameAvailabilityRequest
from ._models import OperationResult
from ._models import Resource
from ._models import ResourceProviderOperation
from ._models import ResourceProviderOperationDisplay
from ._models import ResourceTypeSku
from ._models import ResourceTypeSkuCollection
from ._models import Sku
from ._models import SkuSetting
from ._models import TrackedResource
from ._models import TransactionNode
from ._models import TransactionNodeUpdate
from ._paged_models import BlockchainMemberPaged
from ._paged_models import ConsortiumMemberPaged
from ._paged_models import ResourceProviderOperationPaged
from ._paged_models import TransactionNodePaged
from ._blockchain_management_client_enums import (
BlockchainProtocol,
BlockchainMemberProvisioningState,
NameAvailabilityReason,
NodeProvisioningState,
)

__all__ = [
'ApiKey',
'ApiKeyCollection',
'BlockchainMember',
'BlockchainMemberNodesSku',
'BlockchainMemberUpdate',
'Consortium',
'ConsortiumCollection',
'ConsortiumMember',
'FirewallRule',
'NameAvailability',
'NameAvailabilityRequest',
'OperationResult',
'Resource',
'ResourceProviderOperation',
'ResourceProviderOperationDisplay',
'ResourceTypeSku',
'ResourceTypeSkuCollection',
'Sku',
'SkuSetting',
'TrackedResource',
'TransactionNode',
'TransactionNodeUpdate',
'BlockchainMemberPaged',
'ConsortiumMemberPaged',
'ResourceProviderOperationPaged',
'TransactionNodePaged',
'BlockchainProtocol',
'BlockchainMemberProvisioningState',
'NameAvailabilityReason',
'NodeProvisioningState',
]
Original file line number Diff line number Diff line change
@@ -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 enum import Enum


class BlockchainProtocol(str, Enum):

not_specified = "NotSpecified"
parity = "Parity"
quorum = "Quorum"
corda = "Corda"


class BlockchainMemberProvisioningState(str, Enum):

not_specified = "NotSpecified"
updating = "Updating"
deleting = "Deleting"
succeeded = "Succeeded"
failed = "Failed"
stale = "Stale"


class NameAvailabilityReason(str, Enum):

not_specified = "NotSpecified"
already_exists = "AlreadyExists"
invalid = "Invalid"


class NodeProvisioningState(str, Enum):

not_specified = "NotSpecified"
updating = "Updating"
deleting = "Deleting"
succeeded = "Succeeded"
failed = "Failed"
Loading