azure-mgmt-agricultureplatform 1.0.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. azure/mgmt/agricultureplatform/__init__.py +32 -0
  2. azure/mgmt/agricultureplatform/_client.py +137 -0
  3. azure/mgmt/agricultureplatform/_configuration.py +80 -0
  4. azure/mgmt/agricultureplatform/_patch.py +21 -0
  5. azure/mgmt/agricultureplatform/_utils/__init__.py +6 -0
  6. azure/mgmt/agricultureplatform/_utils/model_base.py +1337 -0
  7. azure/mgmt/agricultureplatform/_utils/serialization.py +2041 -0
  8. azure/mgmt/agricultureplatform/_version.py +9 -0
  9. azure/mgmt/agricultureplatform/aio/__init__.py +29 -0
  10. azure/mgmt/agricultureplatform/aio/_client.py +141 -0
  11. azure/mgmt/agricultureplatform/aio/_configuration.py +80 -0
  12. azure/mgmt/agricultureplatform/aio/_patch.py +21 -0
  13. azure/mgmt/agricultureplatform/aio/operations/__init__.py +27 -0
  14. azure/mgmt/agricultureplatform/aio/operations/_operations.py +1102 -0
  15. azure/mgmt/agricultureplatform/aio/operations/_patch.py +21 -0
  16. azure/mgmt/agricultureplatform/models/__init__.py +92 -0
  17. azure/mgmt/agricultureplatform/models/_enums.py +103 -0
  18. azure/mgmt/agricultureplatform/models/_models.py +1037 -0
  19. azure/mgmt/agricultureplatform/models/_patch.py +21 -0
  20. azure/mgmt/agricultureplatform/operations/__init__.py +27 -0
  21. azure/mgmt/agricultureplatform/operations/_operations.py +1303 -0
  22. azure/mgmt/agricultureplatform/operations/_patch.py +21 -0
  23. azure/mgmt/agricultureplatform/py.typed +1 -0
  24. azure_mgmt_agricultureplatform-1.0.0b1.dist-info/METADATA +94 -0
  25. azure_mgmt_agricultureplatform-1.0.0b1.dist-info/RECORD +28 -0
  26. azure_mgmt_agricultureplatform-1.0.0b1.dist-info/WHEEL +5 -0
  27. azure_mgmt_agricultureplatform-1.0.0b1.dist-info/licenses/LICENSE +21 -0
  28. azure_mgmt_agricultureplatform-1.0.0b1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,32 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+ # pylint: disable=wrong-import-position
9
+
10
+ from typing import TYPE_CHECKING
11
+
12
+ if TYPE_CHECKING:
13
+ from ._patch import * # pylint: disable=unused-wildcard-import
14
+
15
+ from ._client import AgriculturePlatformMgmtClient # type: ignore
16
+ from ._version import VERSION
17
+
18
+ __version__ = VERSION
19
+
20
+ try:
21
+ from ._patch import __all__ as _patch_all
22
+ from ._patch import *
23
+ except ImportError:
24
+ _patch_all = []
25
+ from ._patch import patch_sdk as _patch_sdk
26
+
27
+ __all__ = [
28
+ "AgriculturePlatformMgmtClient",
29
+ ]
30
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
31
+
32
+ _patch_sdk()
@@ -0,0 +1,137 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ from copy import deepcopy
10
+ from typing import Any, Optional, TYPE_CHECKING, cast
11
+ from typing_extensions import Self
12
+
13
+ from azure.core.pipeline import policies
14
+ from azure.core.rest import HttpRequest, HttpResponse
15
+ from azure.core.settings import settings
16
+ from azure.mgmt.core import ARMPipelineClient
17
+ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18
+ from azure.mgmt.core.tools import get_arm_endpoints
19
+
20
+ from ._configuration import AgriculturePlatformMgmtClientConfiguration
21
+ from ._utils.serialization import Deserializer, Serializer
22
+ from .operations import AgriServiceOperations, Operations
23
+
24
+ if TYPE_CHECKING:
25
+ from azure.core import AzureClouds
26
+ from azure.core.credentials import TokenCredential
27
+
28
+
29
+ class AgriculturePlatformMgmtClient:
30
+ """AgriculturePlatformMgmtClient.
31
+
32
+ :ivar operations: Operations operations
33
+ :vartype operations: azure.mgmt.agricultureplatform.operations.Operations
34
+ :ivar agri_service: AgriServiceOperations operations
35
+ :vartype agri_service: azure.mgmt.agricultureplatform.operations.AgriServiceOperations
36
+ :param credential: Credential used to authenticate requests to the service. Required.
37
+ :type credential: ~azure.core.credentials.TokenCredential
38
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
39
+ :type subscription_id: str
40
+ :param base_url: Service host. Default value is None.
41
+ :type base_url: str
42
+ :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
43
+ None.
44
+ :paramtype cloud_setting: ~azure.core.AzureClouds
45
+ :keyword api_version: The API version to use for this operation. Default value is
46
+ "2024-06-01-preview". Note that overriding this default value may result in unsupported
47
+ behavior.
48
+ :paramtype api_version: str
49
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
50
+ Retry-After header is present.
51
+ """
52
+
53
+ def __init__(
54
+ self,
55
+ credential: "TokenCredential",
56
+ subscription_id: str,
57
+ base_url: Optional[str] = None,
58
+ *,
59
+ cloud_setting: Optional["AzureClouds"] = None,
60
+ **kwargs: Any
61
+ ) -> None:
62
+ _endpoint = "{endpoint}"
63
+ _cloud = cloud_setting or settings.current.azure_cloud # type: ignore
64
+ _endpoints = get_arm_endpoints(_cloud)
65
+ if not base_url:
66
+ base_url = _endpoints["resource_manager"]
67
+ credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
68
+ self._config = AgriculturePlatformMgmtClientConfiguration(
69
+ credential=credential,
70
+ subscription_id=subscription_id,
71
+ base_url=cast(str, base_url),
72
+ cloud_setting=cloud_setting,
73
+ credential_scopes=credential_scopes,
74
+ **kwargs
75
+ )
76
+
77
+ _policies = kwargs.pop("policies", None)
78
+ if _policies is None:
79
+ _policies = [
80
+ policies.RequestIdPolicy(**kwargs),
81
+ self._config.headers_policy,
82
+ self._config.user_agent_policy,
83
+ self._config.proxy_policy,
84
+ policies.ContentDecodePolicy(**kwargs),
85
+ ARMAutoResourceProviderRegistrationPolicy(),
86
+ self._config.redirect_policy,
87
+ self._config.retry_policy,
88
+ self._config.authentication_policy,
89
+ self._config.custom_hook_policy,
90
+ self._config.logging_policy,
91
+ policies.DistributedTracingPolicy(**kwargs),
92
+ policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
93
+ self._config.http_logging_policy,
94
+ ]
95
+ self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
96
+
97
+ self._serialize = Serializer()
98
+ self._deserialize = Deserializer()
99
+ self._serialize.client_side_validation = False
100
+ self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
101
+ self.agri_service = AgriServiceOperations(self._client, self._config, self._serialize, self._deserialize)
102
+
103
+ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
104
+ """Runs the network request through the client's chained policies.
105
+
106
+ >>> from azure.core.rest import HttpRequest
107
+ >>> request = HttpRequest("GET", "https://www.example.org/")
108
+ <HttpRequest [GET], url: 'https://www.example.org/'>
109
+ >>> response = client.send_request(request)
110
+ <HttpResponse: 200 OK>
111
+
112
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
113
+
114
+ :param request: The network request you want to make. Required.
115
+ :type request: ~azure.core.rest.HttpRequest
116
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
117
+ :return: The response of your network call. Does not do error handling on your response.
118
+ :rtype: ~azure.core.rest.HttpResponse
119
+ """
120
+
121
+ request_copy = deepcopy(request)
122
+ path_format_arguments = {
123
+ "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
124
+ }
125
+
126
+ request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
127
+ return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
128
+
129
+ def close(self) -> None:
130
+ self._client.close()
131
+
132
+ def __enter__(self) -> Self:
133
+ self._client.__enter__()
134
+ return self
135
+
136
+ def __exit__(self, *exc_details: Any) -> None:
137
+ self._client.__exit__(*exc_details)
@@ -0,0 +1,80 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # Code generated by Microsoft (R) Python Code Generator.
6
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ # --------------------------------------------------------------------------
8
+
9
+ from typing import Any, Optional, TYPE_CHECKING
10
+
11
+ from azure.core.pipeline import policies
12
+ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
13
+
14
+ from ._version import VERSION
15
+
16
+ if TYPE_CHECKING:
17
+ from azure.core import AzureClouds
18
+ from azure.core.credentials import TokenCredential
19
+
20
+
21
+ class AgriculturePlatformMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
22
+ """Configuration for AgriculturePlatformMgmtClient.
23
+
24
+ Note that all parameters used to create this instance are saved as instance
25
+ attributes.
26
+
27
+ :param credential: Credential used to authenticate requests to the service. Required.
28
+ :type credential: ~azure.core.credentials.TokenCredential
29
+ :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
30
+ :type subscription_id: str
31
+ :param base_url: Service host. Default value is "https://management.azure.com".
32
+ :type base_url: str
33
+ :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34
+ None.
35
+ :type cloud_setting: ~azure.core.AzureClouds
36
+ :keyword api_version: The API version to use for this operation. Default value is
37
+ "2024-06-01-preview". Note that overriding this default value may result in unsupported
38
+ behavior.
39
+ :paramtype api_version: str
40
+ """
41
+
42
+ def __init__(
43
+ self,
44
+ credential: "TokenCredential",
45
+ subscription_id: str,
46
+ base_url: str = "https://management.azure.com",
47
+ cloud_setting: Optional["AzureClouds"] = None,
48
+ **kwargs: Any
49
+ ) -> None:
50
+ api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
51
+
52
+ if credential is None:
53
+ raise ValueError("Parameter 'credential' must not be None.")
54
+ if subscription_id is None:
55
+ raise ValueError("Parameter 'subscription_id' must not be None.")
56
+
57
+ self.credential = credential
58
+ self.subscription_id = subscription_id
59
+ self.base_url = base_url
60
+ self.cloud_setting = cloud_setting
61
+ self.api_version = api_version
62
+ self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
63
+ kwargs.setdefault("sdk_moniker", "mgmt-agricultureplatform/{}".format(VERSION))
64
+ self.polling_interval = kwargs.get("polling_interval", 30)
65
+ self._configure(**kwargs)
66
+
67
+ def _configure(self, **kwargs: Any) -> None:
68
+ self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
69
+ self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
70
+ self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
71
+ self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
72
+ self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
73
+ self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
74
+ self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
75
+ self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
76
+ self.authentication_policy = kwargs.get("authentication_policy")
77
+ if self.credential and not self.authentication_policy:
78
+ self.authentication_policy = ARMChallengeAuthenticationPolicy(
79
+ self.credential, *self.credential_scopes, **kwargs
80
+ )
@@ -0,0 +1,21 @@
1
+ # coding=utf-8
2
+ # --------------------------------------------------------------------------
3
+ # Copyright (c) Microsoft Corporation. All rights reserved.
4
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
+ # --------------------------------------------------------------------------
6
+ """Customize generated code here.
7
+
8
+ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
9
+ """
10
+
11
+
12
+ __all__: list[str] = [] # Add all objects you want publicly available to users at this package level
13
+
14
+
15
+ def patch_sdk():
16
+ """Do not remove from this file.
17
+
18
+ `patch_sdk` is a last resort escape hatch that allows you to do customizations
19
+ you can't accomplish using the techniques described in
20
+ https://aka.ms/azsdk/python/dpcodegen/python/customize
21
+ """
@@ -0,0 +1,6 @@
1
+ # --------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+ # Code generated by Microsoft (R) Python Code Generator.
5
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
+ # --------------------------------------------------------------------------