Skip to content

Commit

Permalink
Updated Python client to v1.211.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitmovin OpenApi Bot committed Nov 12, 2024
1 parent 0721ac8 commit 1e25e08
Show file tree
Hide file tree
Showing 63 changed files with 4,643 additions and 40 deletions.
14 changes: 12 additions & 2 deletions bitmovin_api_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,10 @@
from bitmovin_api_sdk.encoding.infrastructure.gce.gce_api import GceAccountListQueryParams
from bitmovin_api_sdk.encoding.infrastructure.gce.regions.regions_api import RegionsApi
from bitmovin_api_sdk.encoding.infrastructure.gce.regions.regions_api import GceAccountRegionSettingsListQueryParams
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_api import AkamaiApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_api import AkamaiAccountListQueryParams
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.regions_api import RegionsApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.regions_api import AkamaiAccountRegionSettingsListQueryParams
from bitmovin_api_sdk.encoding.infrastructure.prewarmed_encoder_pools.prewarmed_encoder_pools_api import PrewarmedEncoderPoolsApi
from bitmovin_api_sdk.encoding.infrastructure.prewarmed_encoder_pools.prewarmed_encoder_pools_api import PrewarmedEncoderPoolListQueryParams
from bitmovin_api_sdk.encoding.infrastructure.prewarmed_encoder_pools.schedules.schedules_api import SchedulesApi
Expand Down Expand Up @@ -1038,7 +1042,7 @@
from bitmovin_api_sdk.streams.signing_keys.signing_keys_api import SigningKeysApi

from bitmovin_api_sdk.encoding.templates.templates_api import TemplatesApi

from bitmovin_api_sdk.encoding.templates.templates_api import EncodingTemplateResponseListQueryParams

from bitmovin_api_sdk.models.aac_audio_configuration import AacAudioConfiguration
from bitmovin_api_sdk.models.aac_channel_layout import AacChannelLayout
Expand Down Expand Up @@ -1081,6 +1085,9 @@
from bitmovin_api_sdk.models.adaptive_quant_mode import AdaptiveQuantMode
from bitmovin_api_sdk.models.aes_encryption_drm import AesEncryptionDrm
from bitmovin_api_sdk.models.aes_encryption_method import AesEncryptionMethod
from bitmovin_api_sdk.models.akamai_account import AkamaiAccount
from bitmovin_api_sdk.models.akamai_account_region_settings import AkamaiAccountRegionSettings
from bitmovin_api_sdk.models.akamai_cloud_region import AkamaiCloudRegion
from bitmovin_api_sdk.models.akamai_msl_output import AkamaiMslOutput
from bitmovin_api_sdk.models.akamai_msl_stream_format import AkamaiMslStreamFormat
from bitmovin_api_sdk.models.akamai_msl_version import AkamaiMslVersion
Expand Down Expand Up @@ -1389,8 +1396,11 @@
from bitmovin_api_sdk.models.encoding_stream_input import EncodingStreamInput
from bitmovin_api_sdk.models.encoding_stream_input_details import EncodingStreamInputDetails
from bitmovin_api_sdk.models.encoding_template import EncodingTemplate
from bitmovin_api_sdk.models.encoding_template_details import EncodingTemplateDetails
from bitmovin_api_sdk.models.encoding_template_request import EncodingTemplateRequest
from bitmovin_api_sdk.models.encoding_template_response import EncodingTemplateResponse
from bitmovin_api_sdk.models.encoding_template_start_response import EncodingTemplateStartResponse
from bitmovin_api_sdk.models.encoding_template_type import EncodingTemplateType
from bitmovin_api_sdk.models.encoding_type import EncodingType
from bitmovin_api_sdk.models.encryption_mode import EncryptionMode
from bitmovin_api_sdk.models.enhanced_deinterlace_auto_enable import EnhancedDeinterlaceAutoEnable
Expand Down Expand Up @@ -1871,4 +1881,4 @@
from bitmovin_api_sdk.models.zixi_input import ZixiInput


__version__ = "1.210.0"
__version__ = "1.211.0"
2 changes: 1 addition & 1 deletion bitmovin_api_sdk/common/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RestClient(object):
HTTP_HEADERS = {
'Content-Type': 'application/json',
'X-Api-Client': 'bitmovin-api-sdk-python',
'X-Api-Client-Version': '1.210.0'
'X-Api-Client-Version': '1.211.0'
}

DELETE = 'DELETE'
Expand Down
1 change: 1 addition & 0 deletions bitmovin_api_sdk/encoding/infrastructure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
from bitmovin_api_sdk.encoding.infrastructure.static_ips.static_ips_api import StaticIpsApi
from bitmovin_api_sdk.encoding.infrastructure.azure.azure_api import AzureApi
from bitmovin_api_sdk.encoding.infrastructure.gce.gce_api import GceApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_api import AkamaiApi
from bitmovin_api_sdk.encoding.infrastructure.prewarmed_encoder_pools.prewarmed_encoder_pools_api import PrewarmedEncoderPoolsApi
3 changes: 3 additions & 0 deletions bitmovin_api_sdk/encoding/infrastructure/akamai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_api import AkamaiApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.regions_api import RegionsApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_account_list_query_params import AkamaiAccountListQueryParams
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class AkamaiAccountListQueryParams(object):
def __init__(self, offset=None, limit=None):
# type: (int, int) -> None
super(AkamaiAccountListQueryParams, self).__init__()

self.offset = offset
self.limit = limit

@property
def openapi_types(self):
types = {
'offset': 'int',
'limit': 'int'
}

return types

@property
def attribute_map(self):
attributes = {
'offset': 'offset',
'limit': 'limit'
}

return attributes
100 changes: 100 additions & 0 deletions bitmovin_api_sdk/encoding/infrastructure/akamai/akamai_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# coding: utf-8

from __future__ import absolute_import

from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase
from bitmovin_api_sdk.common.poscheck import poscheck_except
from bitmovin_api_sdk.models.akamai_account import AkamaiAccount
from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope
from bitmovin_api_sdk.models.response_error import ResponseError
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.regions_api import RegionsApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_account_list_query_params import AkamaiAccountListQueryParams


class AkamaiApi(BaseApi):
@poscheck_except(2)
def __init__(self, api_key, tenant_org_id=None, base_url=None, logger=None):
# type: (str, str, str, BitmovinApiLoggerBase) -> None

super(AkamaiApi, self).__init__(
api_key=api_key,
tenant_org_id=tenant_org_id,
base_url=base_url,
logger=logger
)

self.regions = RegionsApi(
api_key=api_key,
tenant_org_id=tenant_org_id,
base_url=base_url,
logger=logger
)

def create(self, akamai_account, **kwargs):
# type: (AkamaiAccount, dict) -> AkamaiAccount
"""Add Akamai account
:param akamai_account: The Akamai account to be added
:type akamai_account: AkamaiAccount, required
:return: Akamai account
:rtype: AkamaiAccount
"""

return self.api_client.post(
'/encoding/infrastructure/akamai',
akamai_account,
type=AkamaiAccount,
**kwargs
)

def delete(self, infrastructure_id, **kwargs):
# type: (string_types, dict) -> AkamaiAccount
"""Delete Akamai account
:param infrastructure_id: Id of the Akamai account
:type infrastructure_id: string_types, required
:return: Akamai account
:rtype: AkamaiAccount
"""

return self.api_client.delete(
'/encoding/infrastructure/akamai/{infrastructure_id}',
path_params={'infrastructure_id': infrastructure_id},
type=AkamaiAccount,
**kwargs
)

def get(self, infrastructure_id, **kwargs):
# type: (string_types, dict) -> AkamaiAccount
"""Akamai account details
:param infrastructure_id: Id of the Akamai account
:type infrastructure_id: string_types, required
:return: Akamai account
:rtype: AkamaiAccount
"""

return self.api_client.get(
'/encoding/infrastructure/akamai/{infrastructure_id}',
path_params={'infrastructure_id': infrastructure_id},
type=AkamaiAccount,
**kwargs
)

def list(self, query_params=None, **kwargs):
# type: (AkamaiAccountListQueryParams, dict) -> AkamaiAccount
"""List Akamai accounts
:param query_params: Query parameters
:type query_params: AkamaiAccountListQueryParams
:return: List of Akamai accounts
:rtype: AkamaiAccount
"""

return self.api_client.get(
'/encoding/infrastructure/akamai',
query_params=query_params,
pagination_response=True,
type=AkamaiAccount,
**kwargs
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.regions_api import RegionsApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.akamai_account_region_settings_list_query_params import AkamaiAccountRegionSettingsListQueryParams
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class AkamaiAccountRegionSettingsListQueryParams(object):
def __init__(self, offset=None, limit=None):
# type: (int, int) -> None
super(AkamaiAccountRegionSettingsListQueryParams, self).__init__()

self.offset = offset
self.limit = limit

@property
def openapi_types(self):
types = {
'offset': 'int',
'limit': 'int'
}

return types

@property
def attribute_map(self):
attributes = {
'offset': 'offset',
'limit': 'limit'
}

return attributes
105 changes: 105 additions & 0 deletions bitmovin_api_sdk/encoding/infrastructure/akamai/regions/regions_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# coding: utf-8

from __future__ import absolute_import

from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase
from bitmovin_api_sdk.common.poscheck import poscheck_except
from bitmovin_api_sdk.models.akamai_account_region_settings import AkamaiAccountRegionSettings
from bitmovin_api_sdk.models.akamai_cloud_region import AkamaiCloudRegion
from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope
from bitmovin_api_sdk.models.response_error import ResponseError
from bitmovin_api_sdk.encoding.infrastructure.akamai.regions.akamai_account_region_settings_list_query_params import AkamaiAccountRegionSettingsListQueryParams


class RegionsApi(BaseApi):
@poscheck_except(2)
def __init__(self, api_key, tenant_org_id=None, base_url=None, logger=None):
# type: (str, str, str, BitmovinApiLoggerBase) -> None

super(RegionsApi, self).__init__(
api_key=api_key,
tenant_org_id=tenant_org_id,
base_url=base_url,
logger=logger
)

def create(self, infrastructure_id, region, akamai_account_region_settings, **kwargs):
# type: (string_types, AkamaiCloudRegion, AkamaiAccountRegionSettings, dict) -> AkamaiAccountRegionSettings
"""Add Akamai account region settings
:param infrastructure_id: Id of the Akamai account
:type infrastructure_id: string_types, required
:param region: Akamai region
:type region: AkamaiCloudRegion, required
:param akamai_account_region_settings: The Akamai account region settings to be added
:type akamai_account_region_settings: AkamaiAccountRegionSettings, required
:return: Akamai account region settings
:rtype: AkamaiAccountRegionSettings
"""

return self.api_client.post(
'/encoding/infrastructure/akamai/{infrastructure_id}/regions/{region}',
akamai_account_region_settings,
path_params={'infrastructure_id': infrastructure_id, 'region': region},
type=AkamaiAccountRegionSettings,
**kwargs
)

def delete(self, infrastructure_id, region, **kwargs):
# type: (string_types, AkamaiCloudRegion, dict) -> AkamaiAccountRegionSettings
"""Delete Akamai account region settings
:param infrastructure_id: Id of the Akamai account
:type infrastructure_id: string_types, required
:param region: Akamai region
:type region: AkamaiCloudRegion, required
:return: Akamai account region settings
:rtype: AkamaiAccountRegionSettings
"""

return self.api_client.delete(
'/encoding/infrastructure/akamai/{infrastructure_id}/regions/{region}',
path_params={'infrastructure_id': infrastructure_id, 'region': region},
type=AkamaiAccountRegionSettings,
**kwargs
)

def get(self, infrastructure_id, region, **kwargs):
# type: (string_types, AkamaiCloudRegion, dict) -> AkamaiAccountRegionSettings
"""Akamai account region settings details
:param infrastructure_id: Id of the Akamai account
:type infrastructure_id: string_types, required
:param region: Akamai region
:type region: AkamaiCloudRegion, required
:return: Region settings for specified region
:rtype: AkamaiAccountRegionSettings
"""

return self.api_client.get(
'/encoding/infrastructure/akamai/{infrastructure_id}/regions/{region}',
path_params={'infrastructure_id': infrastructure_id, 'region': region},
type=AkamaiAccountRegionSettings,
**kwargs
)

def list(self, infrastructure_id, query_params=None, **kwargs):
# type: (string_types, AkamaiAccountRegionSettingsListQueryParams, dict) -> AkamaiAccountRegionSettings
"""List Akamai account region settings
:param infrastructure_id: Id of the Akamai account
:type infrastructure_id: string_types, required
:param query_params: Query parameters
:type query_params: AkamaiAccountRegionSettingsListQueryParams
:return: List of Akamai account region settings
:rtype: AkamaiAccountRegionSettings
"""

return self.api_client.get(
'/encoding/infrastructure/akamai/{infrastructure_id}/regions',
path_params={'infrastructure_id': infrastructure_id},
query_params=query_params,
pagination_response=True,
type=AkamaiAccountRegionSettings,
**kwargs
)
2 changes: 1 addition & 1 deletion bitmovin_api_sdk/encoding/infrastructure/aws/aws_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def delete(self, infrastructure_id, **kwargs):
:param infrastructure_id: Id of the AWS account
:type infrastructure_id: string_types, required
:return: Id of the AWS account
:return: AWS account
:rtype: AwsAccount
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def delete(self, infrastructure_id, **kwargs):
:param infrastructure_id: Id of the Azure account
:type infrastructure_id: string_types, required
:return: Id of the Azure account
:return: Azure account
:rtype: AzureAccount
"""

Expand Down
2 changes: 1 addition & 1 deletion bitmovin_api_sdk/encoding/infrastructure/gce/gce_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def delete(self, infrastructure_id, **kwargs):
:param infrastructure_id: Id of the GCE account
:type infrastructure_id: string_types, required
:return: Id of the GCE account
:return: GCE account
:rtype: GceAccount
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from bitmovin_api_sdk.encoding.infrastructure.static_ips.static_ips_api import StaticIpsApi
from bitmovin_api_sdk.encoding.infrastructure.azure.azure_api import AzureApi
from bitmovin_api_sdk.encoding.infrastructure.gce.gce_api import GceApi
from bitmovin_api_sdk.encoding.infrastructure.akamai.akamai_api import AkamaiApi
from bitmovin_api_sdk.encoding.infrastructure.prewarmed_encoder_pools.prewarmed_encoder_pools_api import PrewarmedEncoderPoolsApi


Expand Down Expand Up @@ -51,6 +52,13 @@ def __init__(self, api_key, tenant_org_id=None, base_url=None, logger=None):
logger=logger
)

self.akamai = AkamaiApi(
api_key=api_key,
tenant_org_id=tenant_org_id,
base_url=base_url,
logger=logger
)

self.prewarmed_encoder_pools = PrewarmedEncoderPoolsApi(
api_key=api_key,
tenant_org_id=tenant_org_id,
Expand Down
1 change: 1 addition & 0 deletions bitmovin_api_sdk/encoding/templates/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from bitmovin_api_sdk.encoding.templates.templates_api import TemplatesApi
from bitmovin_api_sdk.encoding.templates.encoding_template_response_list_query_params import EncodingTemplateResponseListQueryParams
Loading

0 comments on commit 1e25e08

Please sign in to comment.