Skip to content

Commit

Permalink
CodeGen from PR 11695 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
fix java readme (Azure#11695)
  • Loading branch information
SDKAuto committed Nov 18, 2020
1 parent b791d51 commit 5e91382
Show file tree
Hide file tree
Showing 9 changed files with 11,547 additions and 223 deletions.
7 changes: 4 additions & 3 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .event_grid_client import EventGridClient
from .version import VERSION
from ._configuration import EventGridClientConfiguration
from ._event_grid_client import EventGridClient
__all__ = ['EventGridClient', 'EventGridClientConfiguration']

__all__ = ['EventGridClient']
from .version import VERSION

__version__ = VERSION

41 changes: 41 additions & 0 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/_configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 import Configuration

from .version import VERSION


class EventGridClientConfiguration(Configuration):
"""Configuration for EventGridClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, credentials):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = 'https://{topicHostname}'

super(EventGridClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-eventgrid/{}'.format(VERSION))

self.credentials = credentials
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 EventGridClientConfiguration
from .operations import EventGridClientOperationsMixin
from msrest.exceptions import HttpOperationError
from . import models


class EventGridClient(EventGridClientOperationsMixin, SDKClient):
"""EventGrid Client
:ivar config: Configuration for client.
:vartype config: EventGridClientConfiguration
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, credentials):

self.config = EventGridClientConfiguration(credentials)
super(EventGridClient, 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 = '2018-01-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

622 changes: 402 additions & 220 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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 enum import Enum


class MediaJobState(str, Enum):

canceled = "Canceled" #: The job was canceled. This is a final state for the job.
canceling = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job.
error = "Error" #: The job has encountered an error. This is a final state for the job.
finished = "Finished" #: The job is finished. This is a final state for the job.
processing = "Processing" #: The job is processing. This is a transient state for the job.
queued = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state.
scheduled = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states.


class MediaJobErrorCode(str, Enum):

service_error = "ServiceError" #: Fatal service error, please contact support.
service_transient_error = "ServiceTransientError" #: Transient error, please retry, if retry is unsuccessful, please contact support.
download_not_accessible = "DownloadNotAccessible" #: While trying to download the input files, the files were not accessible, please check the availability of the source.
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.
upload_not_accessible = "UploadNotAccessible" #: While trying to upload the output files, the destination was not reachable, please check the availability of the destination.
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.
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.
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.
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.


class MediaJobErrorCategory(str, Enum):

service = "Service" #: The error is service related.
download = "Download" #: The error is download related.
upload = "Upload" #: The error is upload related.
configuration = "Configuration" #: The error is configuration related.
content = "Content" #: The error is related to data in the input files.


class MediaJobRetry(str, Enum):

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.
may_retry = "MayRetry" #: Issue may be resolved after waiting for a period of time and resubmitting the same Job.


class AppAction(str, Enum):

restarted = "Restarted" #: Web app was restarted.
stopped = "Stopped" #: Web app was stopped.
changed_app_settings = "ChangedAppSettings" #: There was an operation to change app setting on the web app.
started = "Started" #: The job has started.
completed = "Completed" #: The job has completed.
failed = "Failed" #: The job has failed to complete.


class StampKind(str, Enum):

public = "Public" #: App Service Plan is running on a public stamp.
ase_v1 = "AseV1" #: App Service Plan is running on an App Service Environment V1.
ase_v2 = "AseV2" #: App Service Plan is running on an App Service Environment V2.


class AppServicePlanAction(str, Enum):

updated = "Updated" #: App Service plan is being updated.


class AsyncStatus(str, Enum):

started = "Started" #: Async operation has started.
completed = "Completed" #: Async operation has completed.
failed = "Failed" #: Async operation failed to complete.
Loading

0 comments on commit 5e91382

Please sign in to comment.