Skip to content

Commit

Permalink
CodeGen from PR 14766 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c599f3365adeeae223b2f38acdcb4ba46ec01603 into 297c086
  • Loading branch information
SDKAuto committed Jun 10, 2021
1 parent fd411ac commit a687fc6
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 19 deletions.
1 change: 1 addition & 0 deletions sdk/attestation/azure-mgmt-attestation/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/attestation/azure-mgmt-attestation/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "a6d3e8138ac7ba734a6142a31933af59b2944da8",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/attestation/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/attestation/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
from ._models_py3 import OperationList
from ._models_py3 import OperationsDefinition
from ._models_py3 import OperationsDisplayDefinition
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import SystemData
Expand All @@ -38,7 +40,9 @@
from ._models import OperationList
from ._models import OperationsDefinition
from ._models import OperationsDisplayDefinition
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateLinkServiceConnectionState
from ._models import ProxyResource
from ._models import Resource
from ._models import SystemData
Expand All @@ -47,6 +51,7 @@
from ._attestation_management_client_enums import (
CreatedByType,
AttestationServiceStatus,
PrivateEndpointServiceConnectionStatus,
PrivateEndpointConnectionProvisioningState,
)

Expand All @@ -62,13 +67,16 @@
'OperationList',
'OperationsDefinition',
'OperationsDisplayDefinition',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateLinkServiceConnectionState',
'ProxyResource',
'Resource',
'SystemData',
'TrackedResource',
'PrivateEndpointConnectionPaged',
'CreatedByType',
'AttestationServiceStatus',
'PrivateEndpointServiceConnectionStatus',
'PrivateEndpointConnectionProvisioningState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ class AttestationServiceStatus(str, Enum):
error = "Error"


class PrivateEndpointServiceConnectionStatus(str, Enum):

pending = "Pending"
approved = "Approved"
rejected = "Rejected"


class PrivateEndpointConnectionProvisioningState(str, Enum):

succeeded = "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,37 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)


class PrivateEndpoint(Model):
"""The Private Endpoint resource.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The ARM identifier for Private Endpoint
:vartype id: str
"""

_validation = {
'id': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateEndpoint, self).__init__(**kwargs)
self.id = None


class PrivateEndpointConnection(Resource):
"""The Private Endpoint Connection 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 resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
Expand All @@ -574,9 +599,16 @@ class PrivateEndpointConnection(Resource):
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param provisioning_state: Provisioning state of the private endpoint
connection. Possible values include: 'Succeeded', 'Creating', 'Deleting',
'Failed'
:param private_endpoint: The resource of private end point.
:type private_endpoint: ~azure.mgmt.attestation.models.PrivateEndpoint
:param private_link_service_connection_state: Required. A collection of
information about the state of the connection between service consumer and
provider.
:type private_link_service_connection_state:
~azure.mgmt.attestation.models.PrivateLinkServiceConnectionState
:param provisioning_state: The provisioning state of the private endpoint
connection resource. Possible values include: 'Succeeded', 'Creating',
'Deleting', 'Failed'
:type provisioning_state: str or
~azure.mgmt.attestation.models.PrivateEndpointConnectionProvisioningState
"""
Expand All @@ -585,20 +617,54 @@ class PrivateEndpointConnection(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'private_link_service_connection_state': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateEndpointConnection, self).__init__(**kwargs)
self.private_endpoint = kwargs.get('private_endpoint', None)
self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None)
self.provisioning_state = kwargs.get('provisioning_state', None)


class PrivateLinkServiceConnectionState(Model):
"""A collection of information about the state of the connection between
service consumer and provider.
:param status: Indicates whether the connection has been
Approved/Rejected/Removed by the owner of the service. Possible values
include: 'Pending', 'Approved', 'Rejected'
:type status: str or
~azure.mgmt.attestation.models.PrivateEndpointServiceConnectionStatus
:param description: The reason for approval/rejection of the connection.
:type description: str
:param actions_required: A message indicating if changes on the service
provider require any updates on the consumer.
:type actions_required: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'actions_required': {'key': 'actionsRequired', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.description = kwargs.get('description', None)
self.actions_required = kwargs.get('actions_required', None)


class ProxyResource(Resource):
"""Proxy Resource.
Expand Down Expand Up @@ -651,8 +717,7 @@ class SystemData(Model):
'ManagedIdentity', 'Key'
:type last_modified_by_type: str or
~azure.mgmt.attestation.models.CreatedByType
:param last_modified_at: The type of identity that last modified the
resource.
:param last_modified_at: The timestamp of resource last modification (UTC)
:type last_modified_at: datetime
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,37 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non
self.description = description


class PrivateEndpoint(Model):
"""The Private Endpoint resource.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The ARM identifier for Private Endpoint
:vartype id: str
"""

_validation = {
'id': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(PrivateEndpoint, self).__init__(**kwargs)
self.id = None


class PrivateEndpointConnection(Resource):
"""The Private Endpoint Connection 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 resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
Expand All @@ -574,9 +599,16 @@ class PrivateEndpointConnection(Resource):
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param provisioning_state: Provisioning state of the private endpoint
connection. Possible values include: 'Succeeded', 'Creating', 'Deleting',
'Failed'
:param private_endpoint: The resource of private end point.
:type private_endpoint: ~azure.mgmt.attestation.models.PrivateEndpoint
:param private_link_service_connection_state: Required. A collection of
information about the state of the connection between service consumer and
provider.
:type private_link_service_connection_state:
~azure.mgmt.attestation.models.PrivateLinkServiceConnectionState
:param provisioning_state: The provisioning state of the private endpoint
connection resource. Possible values include: 'Succeeded', 'Creating',
'Deleting', 'Failed'
:type provisioning_state: str or
~azure.mgmt.attestation.models.PrivateEndpointConnectionProvisioningState
"""
Expand All @@ -585,20 +617,54 @@ class PrivateEndpointConnection(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'private_link_service_connection_state': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, *, provisioning_state=None, **kwargs) -> None:
def __init__(self, *, private_link_service_connection_state, private_endpoint=None, provisioning_state=None, **kwargs) -> None:
super(PrivateEndpointConnection, self).__init__(**kwargs)
self.private_endpoint = private_endpoint
self.private_link_service_connection_state = private_link_service_connection_state
self.provisioning_state = provisioning_state


class PrivateLinkServiceConnectionState(Model):
"""A collection of information about the state of the connection between
service consumer and provider.
:param status: Indicates whether the connection has been
Approved/Rejected/Removed by the owner of the service. Possible values
include: 'Pending', 'Approved', 'Rejected'
:type status: str or
~azure.mgmt.attestation.models.PrivateEndpointServiceConnectionStatus
:param description: The reason for approval/rejection of the connection.
:type description: str
:param actions_required: A message indicating if changes on the service
provider require any updates on the consumer.
:type actions_required: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'actions_required': {'key': 'actionsRequired', 'type': 'str'},
}

def __init__(self, *, status=None, description: str=None, actions_required: str=None, **kwargs) -> None:
super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
self.status = status
self.description = description
self.actions_required = actions_required


class ProxyResource(Resource):
"""Proxy Resource.
Expand Down Expand Up @@ -651,8 +717,7 @@ class SystemData(Model):
'ManagedIdentity', 'Key'
:type last_modified_by_type: str or
~azure.mgmt.attestation.models.CreatedByType
:param last_modified_at: The type of identity that last modified the
resource.
:param last_modified_at: The timestamp of resource last modification (UTC)
:type last_modified_at: datetime
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def get(
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}'}

def create(
self, resource_group_name, provider_name, private_endpoint_connection_name, provisioning_state=None, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, provider_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, **operation_config):
"""Update the state of specified private endpoint connection associated
with the attestation provider.
Expand All @@ -193,11 +193,9 @@ def create(
:param private_endpoint_connection_name: Name of the private endpoint
connection associated with the attestation providers.
:type private_endpoint_connection_name: str
:param provisioning_state: Provisioning state of the private endpoint
connection. Possible values include: 'Succeeded', 'Creating',
'Deleting', 'Failed'
:type provisioning_state: str or
~azure.mgmt.attestation.models.PrivateEndpointConnectionProvisioningState
:param properties: The private endpoint connection properties.
:type properties:
~azure.mgmt.attestation.models.PrivateEndpointConnection
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -208,8 +206,6 @@ def create(
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
properties = models.PrivateEndpointConnection(provisioning_state=provisioning_state)

# Construct URL
url = self.create.metadata['url']
path_format_arguments = {
Expand Down

0 comments on commit a687fc6

Please sign in to comment.