Skip to content

Commit

Permalink
CodeGen from PR 19842 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.MachineLearningServices to add version preview/2022-06-01-preview (Azure#19842)

* Adds base for updating Microsoft.MachineLearningServices from version stable/2022-05-01 to version 2022-06-01-preview

* Updates readme

* Updates API version in new specs and examples

* Add idleShutdownSetting to Compute Instances (Azure#19748)

* Added idleTimeBeforeShutdown to compute instance properties

* Added api UpdateIdleShutdownSetting

Co-authored-by: Teo Magnino Chaban <[email protected]>

* Add mfe.json 2022-06-01-preview changes (Azure#19740)

* update mfe.json with 2022-06-01-preview spec

* update go.md with preview-2022-06

* add AutoMLJob examples (initial)

* add LabelingJob examples (initial)

* add Schedule examples (initial)

* prettier

* update AutoMLJob examples

* update LabelingJob examples

* update LabelingJob examples

* prettier

* typo fixes

* add Vectorizer to custom-words.txt

* add missing

* is this a breaking change?

* Revert "update go.md with preview-2022-06"

This reverts commit b49c64ae0eb258069251c8c13085fd1e5dde56e2.

* Updating Swagger Spec for MLC for CustomServices (Azure#19781)

* Updating Swagger Spec for MLC for CustomServices

* Added Examples

* Removing update API in favor of exisiting Patch API and Fixing some Validation issues

* Fixed Pretty Issue

* Fixed Id Issue

* Changed case

* Updated Examples

* Changing Description

* Added nullable fields

* Added update APIs

* Fixing validation errors

* Fix model validation

Co-authored-by: Srivatsa Sinha <[email protected]>

* Add encryption property to workspace update parameters (Azure#19893)

* Add encryption property to workspace update parameters

Adding the ability for users to update CMK keyIdentifier property for workspace update.

* Apply prettier changes

Co-authored-by: Joshua Loeffler <[email protected]>

* Add enum value to OutputDataDeliveryMode (Azure#19964)

* add soft delete related properties (Azure#19907)

* add soft delete related properties

* resolve lint diff issue that enum name duplicaton

Co-authored-by: Xi Jin <[email protected]>

* Remove SoftDeleteEnabled. (Azure#20005)

* reorder DeploymentResourceConfiguration Definition (Azure#20057)

Co-authored-by: Teddy Todorov <[email protected]>
Co-authored-by: teochaban <[email protected]>
Co-authored-by: Teo Magnino Chaban <[email protected]>
Co-authored-by: Teddy Todorov <[email protected]>
Co-authored-by: srivatsasinha <[email protected]>
Co-authored-by: Srivatsa Sinha <[email protected]>
Co-authored-by: jloeffler7 <[email protected]>
Co-authored-by: Joshua Loeffler <[email protected]>
Co-authored-by: XI JIN <[email protected]>
Co-authored-by: Xi Jin <[email protected]>
Co-authored-by: ZhidaLiu <[email protected]>
  • Loading branch information
12 people committed Aug 5, 2022
1 parent 07a647a commit bed3bef
Show file tree
Hide file tree
Showing 82 changed files with 55,782 additions and 10,710 deletions.
11 changes: 11 additions & 0 deletions sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "7f284e06ffccbde5db35773eb4548e76496d9221",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/machinelearningservices/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/machinelearningservices/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
from ._version import VERSION

__version__ = VERSION
__all__ = ['AzureMachineLearningWorkspaces']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
pass
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['AzureMachineLearningWorkspaces']
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,51 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


class AzureMachineLearningWorkspacesConfiguration(Configuration):
class AzureMachineLearningWorkspacesConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for AzureMachineLearningWorkspaces.
Note that all parameters used to create this instance are saved as instance
attributes.
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Azure subscription identifier.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
):
# type: (...) -> None
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2022-06-01-preview") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-08-01"
self.api_version = api_version
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand All @@ -68,4 +70,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""Customize generated code here.
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level

def patch_sdk():
"""Do not remove from this file.
`patch_sdk` is a last resort escape hatch that allows you to do customizations
you can't accomplish using the techniques described in
https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# --------------------------------------------------------------------------
# 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 azure.core.pipeline.transport import HttpRequest

def _convert_request(request, files=None):
data = request.content if not files else None
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
if files:
request.set_formdata_body(files)
return request

def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
formatted_components = template.split("/")
components = [
c for c in formatted_components if "{}".format(key.args[0]) not in c
]
template = "/".join(components)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@
# --------------------------------------------------------------------------

from ._azure_machine_learning_workspaces import AzureMachineLearningWorkspaces

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['AzureMachineLearningWorkspaces']
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Loading

0 comments on commit bed3bef

Please sign in to comment.