Skip to content

Commit 5e91382

Browse files
author
SDKAuto
committed
CodeGen from PR 11695 in Azure/azure-rest-api-specs
fix java readme (Azure#11695)
1 parent b791d51 commit 5e91382

File tree

9 files changed

+11547
-223
lines changed

9 files changed

+11547
-223
lines changed

sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .event_grid_client import EventGridClient
13-
from .version import VERSION
12+
from ._configuration import EventGridClientConfiguration
13+
from ._event_grid_client import EventGridClient
14+
__all__ = ['EventGridClient', 'EventGridClientConfiguration']
1415

15-
__all__ = ['EventGridClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest import Configuration
13+
14+
from .version import VERSION
15+
16+
17+
class EventGridClientConfiguration(Configuration):
18+
"""Configuration for EventGridClient
19+
Note that all parameters used to create this instance are saved as instance
20+
attributes.
21+
22+
:param credentials: Subscription credentials which uniquely identify
23+
client subscription.
24+
:type credentials: None
25+
"""
26+
27+
def __init__(
28+
self, credentials):
29+
30+
if credentials is None:
31+
raise ValueError("Parameter 'credentials' must not be None.")
32+
base_url = 'https://{topicHostname}'
33+
34+
super(EventGridClientConfiguration, self).__init__(base_url)
35+
36+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
37+
self.keep_alive = True
38+
39+
self.add_user_agent('azure-eventgrid/{}'.format(VERSION))
40+
41+
self.credentials = credentials
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import EventGridClientConfiguration
16+
from .operations import EventGridClientOperationsMixin
17+
from msrest.exceptions import HttpOperationError
18+
from . import models
19+
20+
21+
class EventGridClient(EventGridClientOperationsMixin, SDKClient):
22+
"""EventGrid Client
23+
24+
:ivar config: Configuration for client.
25+
:vartype config: EventGridClientConfiguration
26+
27+
:param credentials: Subscription credentials which uniquely identify
28+
client subscription.
29+
:type credentials: None
30+
"""
31+
32+
def __init__(
33+
self, credentials):
34+
35+
self.config = EventGridClientConfiguration(credentials)
36+
super(EventGridClient, self).__init__(self.config.credentials, self.config)
37+
38+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
39+
self.api_version = '2018-01-01'
40+
self._serialize = Serializer(client_models)
41+
self._deserialize = Deserializer(client_models)
42+

sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py

Lines changed: 402 additions & 220 deletions
Large diffs are not rendered by default.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from enum import Enum
13+
14+
15+
class MediaJobState(str, Enum):
16+
17+
canceled = "Canceled" #: The job was canceled. This is a final state for the job.
18+
canceling = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job.
19+
error = "Error" #: The job has encountered an error. This is a final state for the job.
20+
finished = "Finished" #: The job is finished. This is a final state for the job.
21+
processing = "Processing" #: The job is processing. This is a transient state for the job.
22+
queued = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state.
23+
scheduled = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states.
24+
25+
26+
class MediaJobErrorCode(str, Enum):
27+
28+
service_error = "ServiceError" #: Fatal service error, please contact support.
29+
service_transient_error = "ServiceTransientError" #: Transient error, please retry, if retry is unsuccessful, please contact support.
30+
download_not_accessible = "DownloadNotAccessible" #: While trying to download the input files, the files were not accessible, please check the availability of the source.
31+
download_transient_error = "DownloadTransientError" #: While trying to download the input files, there was an issue during transfer (storage service, network errors), see details and check your source.
32+
upload_not_accessible = "UploadNotAccessible" #: While trying to upload the output files, the destination was not reachable, please check the availability of the destination.
33+
upload_transient_error = "UploadTransientError" #: While trying to upload the output files, there was an issue during transfer (storage service, network errors), see details and check your destination.
34+
configuration_unsupported = "ConfigurationUnsupported" #: There was a problem with the combination of input files and the configuration settings applied, fix the configuration settings and retry with the same input, or change input to match the configuration.
35+
content_malformed = "ContentMalformed" #: There was a problem with the input content (for example: zero byte files, or corrupt/non-decodable files), check the input files.
36+
content_unsupported = "ContentUnsupported" #: There was a problem with the format of the input (not valid media file, or an unsupported file/codec), check the validity of the input files.
37+
38+
39+
class MediaJobErrorCategory(str, Enum):
40+
41+
service = "Service" #: The error is service related.
42+
download = "Download" #: The error is download related.
43+
upload = "Upload" #: The error is upload related.
44+
configuration = "Configuration" #: The error is configuration related.
45+
content = "Content" #: The error is related to data in the input files.
46+
47+
48+
class MediaJobRetry(str, Enum):
49+
50+
do_not_retry = "DoNotRetry" #: Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying issue has been corrected.
51+
may_retry = "MayRetry" #: Issue may be resolved after waiting for a period of time and resubmitting the same Job.
52+
53+
54+
class AppAction(str, Enum):
55+
56+
restarted = "Restarted" #: Web app was restarted.
57+
stopped = "Stopped" #: Web app was stopped.
58+
changed_app_settings = "ChangedAppSettings" #: There was an operation to change app setting on the web app.
59+
started = "Started" #: The job has started.
60+
completed = "Completed" #: The job has completed.
61+
failed = "Failed" #: The job has failed to complete.
62+
63+
64+
class StampKind(str, Enum):
65+
66+
public = "Public" #: App Service Plan is running on a public stamp.
67+
ase_v1 = "AseV1" #: App Service Plan is running on an App Service Environment V1.
68+
ase_v2 = "AseV2" #: App Service Plan is running on an App Service Environment V2.
69+
70+
71+
class AppServicePlanAction(str, Enum):
72+
73+
updated = "Updated" #: App Service plan is being updated.
74+
75+
76+
class AsyncStatus(str, Enum):
77+
78+
started = "Started" #: Async operation has started.
79+
completed = "Completed" #: Async operation has completed.
80+
failed = "Failed" #: Async operation failed to complete.

0 commit comments

Comments
 (0)