Skip to content

Commit

Permalink
CodeGen from PR 12045 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge a19a6096de895d815bd9377841b70564c35a886c into 7dddc4b
  • Loading branch information
SDKAuto committed Dec 10, 2020
1 parent e1f2009 commit 606d9ed
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import AzureRedHatOpenShiftClientConfiguration
from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient
__all__ = ['AzureRedHatOpenShiftClient', 'AzureRedHatOpenShiftClientConfiguration']
from ._configuration import AzureRedHatOpenShift4ClientConfiguration
from ._azure_red_hat_open_shift4_client import AzureRedHatOpenShift4Client
__all__ = ['AzureRedHatOpenShift4Client', 'AzureRedHatOpenShift4ClientConfiguration']

from .version import VERSION

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import AzureRedHatOpenShift4ClientConfiguration
from .operations import Operations
from .operations import OpenShiftClustersOperations
from . import models


class AzureRedHatOpenShift4Client(SDKClient):
"""Rest API for Azure Red Hat OpenShift 4
:ivar config: Configuration for client.
:vartype config: AzureRedHatOpenShift4ClientConfiguration
:ivar operations: Operations operations
:vartype operations: azure.mgmt.redhatopenshift.v2020_04_30.operations.Operations
:ivar open_shift_clusters: OpenShiftClusters operations
:vartype open_shift_clusters: azure.mgmt.redhatopenshift.v2020_04_30.operations.OpenShiftClustersOperations
: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: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

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

self.config = AzureRedHatOpenShift4ClientConfiguration(credentials, subscription_id, base_url)
super(AzureRedHatOpenShift4Client, 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 = '2020-04-30'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.open_shift_clusters = OpenShiftClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from .version import VERSION


class AzureRedHatOpenShiftClientConfiguration(AzureConfiguration):
"""Configuration for AzureRedHatOpenShiftClient
class AzureRedHatOpenShift4ClientConfiguration(AzureConfiguration):
"""Configuration for AzureRedHatOpenShift4Client
Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -36,7 +36,7 @@ def __init__(
if not base_url:
base_url = 'https://management.azure.com'

super(AzureRedHatOpenShiftClientConfiguration, self).__init__(base_url)
super(AzureRedHatOpenShift4ClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ def __init__(self, **kwargs):
class Resource(Model):
"""Resource.
Common fields that are returned in the response for all Azure Resource
Manager resources.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
"""

Expand All @@ -75,19 +78,21 @@ def __init__(self, **kwargs):


class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.
"""Entity Resource.
The resource model definition for an Azure Resource Manager resource with
an etag.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
Expand Down Expand Up @@ -315,20 +320,23 @@ def __init__(self, **kwargs):


class TrackedResource(Resource):
"""The resource model definition for a ARM tracked top level resource.
"""Tracked Resource.
The resource model definition for an Azure Resource Manager tracked top
level resource which has 'tags' and a 'location'.
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 resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
Expand Down Expand Up @@ -365,13 +373,13 @@ class OpenShiftCluster(TrackedResource):
All required parameters must be populated in order to send to Azure.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
Expand Down Expand Up @@ -554,19 +562,21 @@ def __init__(self, **kwargs):


class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
"""Proxy Resource.
The resource model definition for a Azure Resource Manager proxy resource.
It will not have tags and a location.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ def __init__(self, *, visibility=None, url: str=None, ip: str=None, **kwargs) ->
class Resource(Model):
"""Resource.
Common fields that are returned in the response for all Azure Resource
Manager resources.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
"""

Expand All @@ -75,19 +78,21 @@ def __init__(self, **kwargs) -> None:


class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.
"""Entity Resource.
The resource model definition for an Azure Resource Manager resource with
an etag.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
Expand Down Expand Up @@ -315,20 +320,23 @@ def __init__(self, *, pod_cidr: str=None, service_cidr: str=None, **kwargs) -> N


class TrackedResource(Resource):
"""The resource model definition for a ARM tracked top level resource.
"""Tracked Resource.
The resource model definition for an Azure Resource Manager tracked top
level resource which has 'tags' and a 'location'.
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 resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
Expand Down Expand Up @@ -365,13 +373,13 @@ class OpenShiftCluster(TrackedResource):
All required parameters must be populated in order to send to Azure.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param tags: Resource tags.
:type tags: dict[str, str]
Expand Down Expand Up @@ -554,19 +562,21 @@ def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs)


class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
"""Proxy Resource.
The resource model definition for a Azure Resource Manager proxy resource.
It will not have tags and a location.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
:ivar id: Fully qualified resource ID 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.
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
"""

Expand Down
Loading

0 comments on commit 606d9ed

Please sign in to comment.