diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md
index dd9db610..9f1367de 100644
--- a/DOCUMENTATION.md
+++ b/DOCUMENTATION.md
@@ -94,7 +94,7 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [get_dashboard_url(app_id)](#application.get_dashboard_url) ⇒ str
- [get_directly_accessible(slug_or_uuid_or_id, options)](#application.get_directly_accessible) ⇒ [TypeApplication
](#typeapplication)
- [get_id(slug_or_uuid_or_id)](#application.get_id) ⇒ int
- - [get_target_release_hash(slug_or_uuid_or_id)](#application.get_target_release_hash) ⇒ Union[str, None]
+ - [get_target_release_hash(slug_or_uuid_or_id)](#application.get_target_release_hash) ⇒ Optional[str]
- [get_with_device_service_details(slug_or_uuid_or_id, options)](#application.get_with_device_service_details) ⇒ [TypeApplicationWithDeviceServiceDetails
](#typeapplicationwithdeviceservicedetails)
- [grant_support_access(slug_or_uuid_or_id, expiry_timestamp)](#application.grant_support_access) ⇒ None
- [has(slug_or_uuid_or_id)](#application.has) ⇒ bool
@@ -115,17 +115,17 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [remove(slug_or_uuid_or_id, tag_key)](#applicationtag.remove) ⇒ None
- [set(slug_or_uuid_or_id, tag_key, value)](#applicationtag.set) ⇒ None
- [.config_var](#applicationconfigvariable)
- - [get(slug_or_uuid_or_id, env_var_name)](#applicationconfigvariable.get) ⇒ Union[str, None]
+ - [get(slug_or_uuid_or_id, env_var_name)](#applicationconfigvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#applicationconfigvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(slug_or_uuid_or_id, key)](#applicationconfigvariable.remove) ⇒ None
- [set(slug_or_uuid_or_id, env_var_name, value)](#applicationconfigvariable.set) ⇒ None
- [.env_var](#applicationenvvariable)
- - [get(slug_or_uuid_or_id, env_var_name)](#applicationenvvariable.get) ⇒ Union[str, None]
+ - [get(slug_or_uuid_or_id, env_var_name)](#applicationenvvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#applicationenvvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(slug_or_uuid_or_id, key)](#applicationenvvariable.remove) ⇒ None
- [set(slug_or_uuid_or_id, env_var_name, value)](#applicationenvvariable.set) ⇒ None
- [.build_var](#buildenvvariable)
- - [get(slug_or_uuid_or_id, env_var_name)](#buildenvvariable.get) ⇒ Union[str, None]
+ - [get(slug_or_uuid_or_id, env_var_name)](#buildenvvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#buildenvvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(slug_or_uuid_or_id, key)](#buildenvvariable.remove) ⇒ None
- [set(slug_or_uuid_or_id, env_var_name, value)](#buildenvvariable.set) ⇒ None
@@ -204,26 +204,26 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [unset_custom_location(uuid_or_id_or_ids)](#device.unset_custom_location) ⇒ None
- [update(uuid_or_id, force)](#device.update) ⇒ None
- [.tags](#devicetag)
- - [get(uuid_or_id, tag_key)](#devicetag.get) ⇒ Union[str, None]
+ - [get(uuid_or_id, tag_key)](#devicetag.get) ⇒ Optional[str]
- [get_all(options)](#devicetag.get_all) ⇒ [List[BaseTagType]
](#basetagtype)
- [get_all_by_application(slug_or_uuid_or_id, options)](#devicetag.get_all_by_application) ⇒ [List[BaseTagType]
](#basetagtype)
- [get_all_by_device(uuid_or_id, options)](#devicetag.get_all_by_device) ⇒ [List[BaseTagType]
](#basetagtype)
- [remove(uuid_or_id, tag_key)](#devicetag.remove) ⇒ None
- [set(uuid_or_id, tag_key, value)](#devicetag.set) ⇒ None
- [.config_var](#deviceconfigvariable)
- - [get(uuid_or_id, env_var_name)](#deviceconfigvariable.get) ⇒ Union[str, None]
+ - [get(uuid_or_id, env_var_name)](#deviceconfigvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#deviceconfigvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [get_all_by_device(uuid_or_id, options)](#deviceconfigvariable.get_all_by_device) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(uuid_or_id, key)](#deviceconfigvariable.remove) ⇒ None
- [set(uuid_or_id, env_var_name, value)](#deviceconfigvariable.set) ⇒ None
- [.env_var](#deviceenvvariable)
- - [get(uuid_or_id, env_var_name)](#deviceenvvariable.get) ⇒ Union[str, None]
+ - [get(uuid_or_id, env_var_name)](#deviceenvvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#deviceenvvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [get_all_by_device(uuid_or_id, options)](#deviceenvvariable.get_all_by_device) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(uuid_or_id, key)](#deviceenvvariable.remove) ⇒ None
- [set(uuid_or_id, env_var_name, value)](#deviceenvvariable.set) ⇒ None
- [.service_var](#deviceserviceenvvariable)
- - [get(uuid_or_id, service_name_or_id, key)](#deviceserviceenvvariable.get) ⇒ Union[str, None]
+ - [get(uuid_or_id, service_name_or_id, key)](#deviceserviceenvvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#deviceserviceenvvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [get_all_by_device(uuid_or_id, options)](#deviceserviceenvvariable.get_all_by_device) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(uuid_or_id, service_name_or_id, key)](#deviceserviceenvvariable.remove) ⇒ None
@@ -261,7 +261,7 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [get_all(options)](#organizationmembership.get_all) ⇒ [List[OrganizationMembershipType]
](#organizationmembershiptype)
- [get_all_by_organization(handle_or_id, options)](#organizationmembership.get_all_by_organization) ⇒ [List[OrganizationMembershipType]
](#organizationmembershiptype)
- [.tags](#organizationmembershiptag)
- - [get(membership_id, tag_key)](#organizationmembershiptag.get) ⇒ Union[str, None]
+ - [get(membership_id, tag_key)](#organizationmembershiptag.get) ⇒ Optional[str]
- [get_all(options)](#organizationmembershiptag.get_all) ⇒ [List[OrganizationMembershipTagType]
](#organizationmembershiptagtype)
- [get_all_by_organization(handle_or_id, options)](#organizationmembershiptag.get_all_by_organization) ⇒ [List[OrganizationMembershipTagType]
](#organizationmembershiptagtype)
- [get_all_by_organization_membership(membership_id, options)](#organizationmembershiptag.get_all_by_organization_membership) ⇒ [List[OrganizationMembershipTagType]
](#organizationmembershiptagtype)
@@ -279,7 +279,7 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [get_available_os_versions(device_type)](#deviceos.get_available_os_versions) ⇒ None
- [get_config(slug_or_uuid_or_id, options)](#deviceos.get_config) ⇒ None
- [get_download_size(device_type, version)](#deviceos.get_download_size) ⇒ float
- - [get_max_satisfying_version(device_type, version_or_range, os_type)](#deviceos.get_max_satisfying_version) ⇒ Union[str, None]
+ - [get_max_satisfying_version(device_type, version_or_range, os_type)](#deviceos.get_max_satisfying_version) ⇒ Optional[str]
- [get_supported_os_update_versions(device_type, current_version)](#deviceos.get_supported_os_update_versions) ⇒ None
- [is_architecture_compatible_with(os_architecture, application_architecture)](#deviceos.is_architecture_compatible_with) ⇒ None
- [is_supported_os_update(device_type, current_version, target_version)](#deviceos.is_supported_os_update) ⇒ bool
@@ -290,14 +290,14 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [finalize(commit_or_id_or_raw_version)](#release.finalize) ⇒ None
- [get(commit_or_id_or_raw_version, options)](#release.get) ⇒ [ReleaseType
](#releasetype)
- [get_all_by_application(slug_or_uuid_or_id, options)](#release.get_all_by_application) ⇒ [List[ReleaseType]
](#releasetype)
- - [get_latest_by_application(slug_or_uuid_or_id, options)](#release.get_latest_by_application) ⇒ [Union[ReleaseType, None]
](#releasetype)
+ - [get_latest_by_application(slug_or_uuid_or_id, options)](#release.get_latest_by_application) ⇒ [Optional[ReleaseType]
](#releasetype)
- [get_with_image_details(commit_or_id_or_raw_version, image_options, release_options)](#release.get_with_image_details) ⇒ [ReleaseWithImageDetailsType
](#releasewithimagedetailstype)
- [set_is_invalidated(commit_or_id_or_raw_version, is_invalidated)](#release.set_is_invalidated) ⇒ None
- [set_known_issue_list(commit_or_id_or_raw_version, known_issue_list)](#release.set_known_issue_list) ⇒ None
- [set_note(commit_or_id_or_raw_version, note)](#release.set_note) ⇒ None
- [set_release_version(commit_or_id, semver)](#release.set_release_version) ⇒ None
- [.tags](#releasetag)
- - [get(commit_or_id_or_raw_version, tag_key)](#releasetag.get) ⇒ Union[str, None]
+ - [get(commit_or_id_or_raw_version, tag_key)](#releasetag.get) ⇒ Optional[str]
- [get_all(options)](#releasetag.get_all) ⇒ [List[BaseTagType]
](#basetagtype)
- [get_all_by_application(slug_or_uuid_or_id, options)](#releasetag.get_all_by_application) ⇒ [List[BaseTagType]
](#basetagtype)
- [get_all_by_release(commit_or_id_or_raw_version, options)](#releasetag.get_all_by_release) ⇒ [List[BaseTagType]
](#basetagtype)
@@ -306,7 +306,7 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [.service](#service)
- [get_all_by_application(slug_or_uuid_or_id, options)](#service.get_all_by_application) ⇒ [List[ServiceType]
](#servicetype)
- [.var](#serviceenvvariable)
- - [get(service_id_or_natural_key, key)](#serviceenvvariable.get) ⇒ Union[str, None]
+ - [get(service_id_or_natural_key, key)](#serviceenvvariable.get) ⇒ Optional[str]
- [get_all_by_application(slug_or_uuid_or_id, options)](#serviceenvvariable.get_all_by_application) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [get_all_by_service(service_id_or_natural_key, options)](#serviceenvvariable.get_all_by_service) ⇒ [List[EnvironmentVariableBase]
](#environmentvariablebase)
- [remove(service_id_or_natural_key, key)](#serviceenvvariable.remove) ⇒ None
@@ -317,7 +317,7 @@ hesitate to open an issue in GitHub](https://github.com/balena-io/balena-sdk-pyt
- [.auth](#auth)
- [authenticate()](#auth.authenticate) ⇒ str
- [get_actor_id()](#auth.get_actor_id) ⇒ int
- - [get_token()](#auth.get_token) ⇒ Union[str, None]
+ - [get_token()](#auth.get_token) ⇒ Optional[str]
- [get_user_info()](#auth.get_user_info) ⇒ UserInfo
- [is_logged_in()](#auth.is_logged_in) ⇒ bool
- [login()](#auth.login) ⇒ None
@@ -553,7 +553,7 @@ Given an application slug or uuid or id, returns it numeric id.
```
-### Function: get_target_release_hash(slug_or_uuid_or_id) ⇒ Union[str, None]
+### Function: get_target_release_hash(slug_or_uuid_or_id) ⇒ Optional[str]
Get the hash of the current release for a specific application.
@@ -845,7 +845,7 @@ Set an application tag (update tag value if it exists).
This class implements application config variable model for balena python SDK.
-### Function: get(slug_or_uuid_or_id, env_var_name) ⇒ Union[str, None]
+### Function: get(slug_or_uuid_or_id, env_var_name) ⇒ Optional[str]
Get application config variable.
@@ -882,10 +882,11 @@ Remove an application config variable.
#### Args:
slug_or_uuid_or_id (Union[str, int]): application slug (string), uuid (string) or id (number)
+ key (str): environment variable name.
#### Examples:
```python
->>> balena.models.application.config_var.remove(2184)
+>>> balena.models.application.config_var.remove(2184, 'test_env')
```
@@ -907,7 +908,7 @@ Set the value of a specific application config variable.
This class implements application environment variable model for balena python SDK.
-### Function: get(slug_or_uuid_or_id, env_var_name) ⇒ Union[str, None]
+### Function: get(slug_or_uuid_or_id, env_var_name) ⇒ Optional[str]
Get application environment variable.
@@ -945,10 +946,11 @@ Remove an application environment variable.
#### Args:
slug_or_uuid_or_id (Union[str, int]): application slug (string), uuid (string) or id (number)
+ key (str): environment variable name.
#### Examples:
```python
->>> balena.models.application.env_var.remove(2184)
+>>> balena.models.application.env_var.remove(2184,'test_env4')
```
@@ -970,7 +972,7 @@ Set the value of a specific application environment variable.
This class implements build environment variable model for balena python SDK.
-### Function: get(slug_or_uuid_or_id, env_var_name) ⇒ Union[str, None]
+### Function: get(slug_or_uuid_or_id, env_var_name) ⇒ Optional[str]
Get build environment variable.
@@ -1008,10 +1010,11 @@ Remove an build environment variable.
#### Args:
slug_or_uuid_or_id (Union[str, int]): application slug (string), uuid (string) or id (number)
+ key (str): environment variable name.
#### Examples:
```python
->>> balena.models.application.build_var.remove(2184)
+>>> balena.models.application.build_var.remove(2184, 'test_env4')
```
@@ -2074,7 +2077,7 @@ update the device.
This class implements device tag model for balena python SDK.
-### Function: get(uuid_or_id, tag_key) ⇒ Union[str, None]
+### Function: get(uuid_or_id, tag_key) ⇒ Optional[str]
Set a device tag (update tag value if it exists).
___Note___: Notice that when using the device ID rather than UUID,
@@ -2180,7 +2183,7 @@ it will avoid one extra API roundtrip.
This class implements device config variable model for balena python SDK.
-### Function: get(uuid_or_id, env_var_name) ⇒ Union[str, None]
+### Function: get(uuid_or_id, env_var_name) ⇒ Optional[str]
Get a device config variable.
@@ -2234,10 +2237,11 @@ Remove a device environment variable.
#### Args:
uuid_or_id (Union[str, int]): device uuid (string) or id (int)
+ key (str): environment variable name.
#### Examples:
```python
->>> balena.models.device.config_var.device.remove(2184)
+>>> balena.models.device.config_var.device.remove(2184, 'test_env4')
```
@@ -2259,7 +2263,7 @@ Set the value of a device config variable.
This class implements device environment variable model for balena python SDK.
-### Function: get(uuid_or_id, env_var_name) ⇒ Union[str, None]
+### Function: get(uuid_or_id, env_var_name) ⇒ Optional[str]
Get device environment variable.
@@ -2269,7 +2273,7 @@ Get device environment variable.
#### Examples:
```python
->>> balena.models.device.env_var.get('8deb12','test_env4')
+>>> balena.models.device.env_var.get('8deb12', 'test_env4')
```
@@ -2313,10 +2317,11 @@ Remove a device environment variable.
#### Args:
uuid_or_id (Union[str, int]): device uuid (string) or id (int)
+ key (str): environment variable name.
#### Examples:
```python
->>> balena.models.device.env_var.remove(2184)
+>>> balena.models.device.env_var.remove(2184, 'test_env4')
```
@@ -2331,14 +2336,14 @@ Set the value of a specific environment variable.
#### Examples:
```python
->>> balena.models.device.env_var.set('8deb12','test_env4', 'testing1')
+>>> balena.models.device.env_var.set('8deb12', 'test_env4', 'testing1')
```
## DeviceServiceEnvVariable
This class implements device service variable model for balena python SDK.
-### Function: get(uuid_or_id, service_name_or_id, key) ⇒ Union[str, None]
+### Function: get(uuid_or_id, service_name_or_id, key) ⇒ Optional[str]
Get the overriden value of a service variable on a device
@@ -2832,7 +2837,7 @@ Get all memberships by organization.
This class implements organization membership tag model for balena python SDK.
-### Function: get(membership_id, tag_key) ⇒ Union[str, None]
+### Function: get(membership_id, tag_key) ⇒ Optional[str]
Get an organization membership tag.
@@ -3090,7 +3095,7 @@ Get OS download size estimate. Currently only the raw (uncompressed) size is rep
float: OS image download size, in bytes.
-### Function: get_max_satisfying_version(device_type, version_or_range, os_type) ⇒ Union[str, None]
+### Function: get_max_satisfying_version(device_type, version_or_range, os_type) ⇒ Optional[str]
Get OS download size estimate. Currently only the raw (uncompressed) size is reported.
@@ -3214,7 +3219,7 @@ Get all releases from an application.
List[ReleaseType]: release info.
-### Function: get_latest_by_application(slug_or_uuid_or_id, options) ⇒ [Union[ReleaseType, None]
](#releasetype)
+### Function: get_latest_by_application(slug_or_uuid_or_id, options) ⇒ [Optional[ReleaseType]
](#releasetype)
Get the latest successful release for an application.
@@ -3281,7 +3286,7 @@ Set a direct semver for a given release.
This class implements release tag model for balena python SDK.
-### Function: get(commit_or_id_or_raw_version, tag_key) ⇒ Union[str, None]
+### Function: get(commit_or_id_or_raw_version, tag_key) ⇒ Optional[str]
Get a single release tag.
@@ -3392,7 +3397,7 @@ Get all services from an application.
This class implements Service environment variable model for balena python SDK.
-### Function: get(service_id_or_natural_key, key) ⇒ Union[str, None]
+### Function: get(service_id_or_natural_key, key) ⇒ Optional[str]
Get the value of a specific service variable
@@ -3536,7 +3541,7 @@ Get current logged in actor id.
```
-### Function: get_token() ⇒ Union[str, None]
+### Function: get_token() ⇒ Optional[str]
This function retrieves Auth Token.
@@ -3832,8 +3837,8 @@ The name must be a string; the optional doc argument can have any type.
```python
{
"name": str,
- "description": Union[str, None],
- "expiry_date": Union[str, None]
+ "description": Optional[str],
+ "expiry_date": Optional[str]
}
```
@@ -3846,8 +3851,8 @@ The name must be a string; the optional doc argument can have any type.
"id": int,
"created_at": str,
"name": str,
- "description": Union[str, None],
- "expiry_date": Union[str, None],
+ "description": Optional[str],
+ "expiry_date": Optional[str],
"is_of__actor": Union[List[ActorType], PineDeferred]
}
```
@@ -3927,13 +3932,13 @@ The name must be a string; the optional doc argument can have any type.
"id": int,
"name": str,
"slug": str,
- "description": Union[str, None],
+ "description": Optional[str],
"supports_multicontainer": bool,
"supports_web_url": bool,
"is_legacy": bool,
"requires_payment": bool,
- "needs__os_version_range": Union[str, None],
- "maximum_device_count": Union[int, None]
+ "needs__os_version_range": Optional[str],
+ "maximum_device_count": Optional[int]
}
```
@@ -3968,7 +3973,7 @@ The name must be a string; the optional doc argument can have any type.
{
"id": int,
"slug": str,
- "is_supported_by__device_type": Union[List[CpuArchitectureType], None]
+ "is_supported_by__device_type": Optional[List[CpuArchitectureType]]
}
```
@@ -3987,8 +3992,8 @@ The name must be a string; the optional doc argument can have any type.
"payment_status": Literal["processing", "paid", "failed", "complimentary", "cancelled", "refunded"],
"belongs_to__organization": Union[List[OrganizationType], PineDeferred],
"is_for__feature": Any,
- "is_associated_with__invoice_id": Union[str, None],
- "error_message": Union[str, None]
+ "is_associated_with__invoice_id": Optional[str],
+ "error_message": Optional[str]
}
```
@@ -4020,14 +4025,14 @@ The name must be a string; the optional doc argument can have any type.
"is_ended_by__actor": Union[List[ActorType], PineDeferred, None],
"tracks__device": Union[List[TypeDevice], PineDeferred],
"tracks__actor": Union[List[ActorType], PineDeferred, None],
- "uuid": Union[str, None],
+ "uuid": Optional[str],
"belongs_to__application": Union[List[TypeApplication], PineDeferred],
"is_active": bool,
"is_running__release": Union[List[ReleaseType], PineDeferred, None],
"should_be_running__release": Union[List[ReleaseType], PineDeferred, None],
- "os_version": Union[str, None],
- "os_variant": Union[str, None],
- "supervisor_version": Union[str, None],
+ "os_version": Optional[str],
+ "os_variant": Optional[str],
+ "supervisor_version": Optional[str],
"is_of__device_type": Union[List[DeviceTypeType], PineDeferred, None],
"should_be_managed_by__release": Union[List[ReleaseType], PineDeferred, None]
}
@@ -4090,11 +4095,11 @@ The name must be a string; the optional doc argument can have any type.
"logo": str,
"contract": Any,
"belongs_to__device_family": Union[List[DeviceFamilyType], PineDeferred, None],
- "is_default_for__application": Union[List[TypeApplication], None],
+ "is_default_for__application": Optional[List[TypeApplication]],
"is_of__cpu_architecture": Union[List[CpuArchitectureType], PineDeferred],
- "is_accessible_privately_by__organization": Union[List[OrganizationType], None],
- "describes_device": Union[List[TypeDevice], None],
- "device_type_alias": Union[List[DeviceTypeAliasType], None]
+ "is_accessible_privately_by__organization": Optional[List[OrganizationType]],
+ "describes_device": Optional[List[TypeDevice]],
+ "device_type_alias": Optional[List[DeviceTypeAliasType]]
}
```
@@ -4128,7 +4133,7 @@ The name must be a string; the optional doc argument can have any type.
```python
{
"id": int,
- "download_progress": Union[float, None],
+ "download_progress": Optional[float],
"status": str,
"install_date": str,
"installs__image": Union[List[ImageType], PineDeferred],
@@ -4158,7 +4163,7 @@ The name must be a string; the optional doc argument can have any type.
"dockerfile": str,
"error_message": str,
"is_a_build_of__service": Union[List[ServiceType], PineDeferred],
- "release_image": Union[List[ReleaseImageType], None]
+ "release_image": Optional[List[ReleaseImageType]]
}
```
@@ -4223,7 +4228,7 @@ The name must be a string; the optional doc argument can have any type.
"is_member_of__organization": Union[List[OrganizationType], PineDeferred],
"organization_membership_role": Union[List[OrganizationMembershipRoleType], PineDeferred],
"effective_seat_role": str,
- "organization_membership_tag": Union[List[OrganizationMembershipTagType], None]
+ "organization_membership_tag": Optional[List[OrganizationMembershipTagType]]
}
```
@@ -4251,10 +4256,10 @@ The name must be a string; the optional doc argument can have any type.
"handle": str,
"logo_image": WebResource,
"has_past_due_invoice_since__date": str,
- "application": Union[List[TypeApplication], None],
- "organization_membership": Union[List[OrganizationMembershipType], None],
- "owns__team": Union[List[TeamType], None],
- "organization__has_private_access_to__device_type": Union[List[OrganizationPrivateDeviceTypeAccess], None]
+ "application": Optional[List[TypeApplication]],
+ "organization_membership": Optional[List[OrganizationMembershipType]],
+ "owns__team": Optional[List[TeamType]],
+ "organization__has_private_access_to__device_type": Optional[List[OrganizationPrivateDeviceTypeAccess]]
}
```
@@ -4343,11 +4348,11 @@ The name must be a string; the optional doc argument can have any type.
"invalidation_reason": str,
"is_created_by__user": Union[List[UserType], PineDeferred, None],
"belongs_to__application": Union[List[TypeApplication], PineDeferred],
- "release_image": Union[List[ReleaseImageType], None],
- "should_be_running_on__application": Union[List[TypeApplication], None],
- "is_running_on__device": Union[List[TypeDevice], None],
- "should_be_running_on__device": Union[List[TypeDevice], None],
- "release_tag": Union[List[BaseTagType], None]
+ "release_image": Optional[List[ReleaseImageType]],
+ "should_be_running_on__application": Optional[List[TypeApplication]],
+ "is_running_on__device": Optional[List[TypeDevice]],
+ "should_be_running_on__device": Optional[List[TypeDevice]],
+ "release_tag": Optional[List[BaseTagType]]
}
```
@@ -4403,11 +4408,11 @@ The name must be a string; the optional doc argument can have any type.
"invalidation_reason": str,
"is_created_by__user": Union[List[UserType], PineDeferred, None],
"belongs_to__application": Union[List[TypeApplication], PineDeferred],
- "release_image": Union[List[ReleaseImageType], None],
- "should_be_running_on__application": Union[List[TypeApplication], None],
- "is_running_on__device": Union[List[TypeDevice], None],
- "should_be_running_on__device": Union[List[TypeDevice], None],
- "release_tag": Union[List[BaseTagType], None],
+ "release_image": Optional[List[ReleaseImageType]],
+ "should_be_running_on__application": Optional[List[TypeApplication]],
+ "is_running_on__device": Optional[List[TypeDevice]],
+ "should_be_running_on__device": Optional[List[TypeDevice]],
+ "release_tag": Optional[List[BaseTagType]],
"images": List[ImageBasicInfoType],
"user": BasicUserInfoType
}
@@ -4451,9 +4456,9 @@ The name must be a string; the optional doc argument can have any type.
"created_at": str,
"service_name": str,
"application": Union[List[TypeApplication], PineDeferred],
- "is_built_by__image": Union[List[ImageType], None],
- "service_environment_variable": Union[List[EnvironmentVariableBase], None],
- "device_service_environment_variable": Union[List[EnvironmentVariableBase], None]
+ "is_built_by__image": Optional[List[ImageType]],
+ "service_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "device_service_environment_variable": Optional[List[EnvironmentVariableBase]]
}
```
@@ -4468,7 +4473,7 @@ The name must be a string; the optional doc argument can have any type.
"supervisor_version": str,
"image_name": str,
"is_public": bool,
- "note": Union[str, None],
+ "note": Optional[str],
"is_for__device_type": Union[List[DeviceTypeType], PineDeferred]
}
```
@@ -4509,8 +4514,8 @@ The name must be a string; the optional doc argument can have any type.
"created_at": str,
"name": str,
"belongs_to__organization": Union[List[OrganizationType], PineDeferred],
- "team_membership": Union[List[TeamMembershipType], None],
- "team_application_access": Union[List[TeamApplicationAccessType], None]
+ "team_membership": Optional[List[TeamMembershipType]],
+ "team_application_access": Optional[List[TeamApplicationAccessType]]
}
```
@@ -4540,19 +4545,19 @@ The name must be a string; the optional doc argument can have any type.
"depends_on__application": Union[List[ApplicationType], PineDeferred, None],
"organization": Union[List[OrganizationType], PineDeferred],
"should_be_running__release": Union[List[ReleaseType], PineDeferred, None],
- "application_config_variable": Union[List[EnvironmentVariableBase], None],
- "application_environment_variable": Union[List[EnvironmentVariableBase], None],
- "build_environment_variable": Union[List[EnvironmentVariableBase], None],
- "application_tag": Union[List[BaseTagType], None],
- "owns__device": Union[List[TypeDevice], None],
- "owns__public_device": Union[List[PublicDeviceType], None],
- "owns__release": Union[List[ReleaseType], None],
- "service": Union[List[ServiceType], None],
- "is_depended_on_by__application": Union[List[ApplicationType], None],
- "is_directly_accessible_by__user": Union[List[UserType], None],
- "user_application_membership": Union[List[ApplicationMembershipType], None],
- "team_application_access": Union[List[TeamApplicationAccessType], None],
- "can_use__application_as_host": Union[List[ApplicationHostedOnApplication], None]
+ "application_config_variable": Optional[List[EnvironmentVariableBase]],
+ "application_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "build_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "application_tag": Optional[List[BaseTagType]],
+ "owns__device": Optional[List[TypeDevice]],
+ "owns__public_device": Optional[List[PublicDeviceType]],
+ "owns__release": Optional[List[ReleaseType]],
+ "service": Optional[List[ServiceType]],
+ "is_depended_on_by__application": Optional[List[ApplicationType]],
+ "is_directly_accessible_by__user": Optional[List[UserType]],
+ "user_application_membership": Optional[List[ApplicationMembershipType]],
+ "team_application_access": Optional[List[TeamApplicationAccessType]],
+ "can_use__application_as_host": Optional[List[ApplicationHostedOnApplication]]
}
```
@@ -4582,19 +4587,19 @@ The name must be a string; the optional doc argument can have any type.
"depends_on__application": Union[List[ApplicationType], PineDeferred, None],
"organization": Union[List[OrganizationType], PineDeferred],
"should_be_running__release": Union[List[ReleaseType], PineDeferred, None],
- "application_config_variable": Union[List[EnvironmentVariableBase], None],
- "application_environment_variable": Union[List[EnvironmentVariableBase], None],
- "build_environment_variable": Union[List[EnvironmentVariableBase], None],
- "application_tag": Union[List[BaseTagType], None],
+ "application_config_variable": Optional[List[EnvironmentVariableBase]],
+ "application_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "build_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "application_tag": Optional[List[BaseTagType]],
"owns__device": List[TypeDeviceWithServices],
- "owns__public_device": Union[List[PublicDeviceType], None],
- "owns__release": Union[List[ReleaseType], None],
- "service": Union[List[ServiceType], None],
- "is_depended_on_by__application": Union[List[ApplicationType], None],
- "is_directly_accessible_by__user": Union[List[UserType], None],
- "user_application_membership": Union[List[ApplicationMembershipType], None],
- "team_application_access": Union[List[TeamApplicationAccessType], None],
- "can_use__application_as_host": Union[List[ApplicationHostedOnApplication], None]
+ "owns__public_device": Optional[List[PublicDeviceType]],
+ "owns__release": Optional[List[ReleaseType]],
+ "service": Optional[List[ServiceType]],
+ "is_depended_on_by__application": Optional[List[ApplicationType]],
+ "is_directly_accessible_by__user": Optional[List[UserType]],
+ "user_application_membership": Optional[List[ApplicationMembershipType]],
+ "team_application_access": Optional[List[TeamApplicationAccessType]],
+ "can_use__application_as_host": Optional[List[ApplicationHostedOnApplication]]
}
```
@@ -4673,11 +4678,11 @@ The name must be a string; the optional doc argument can have any type.
"should_be_running__release": Union[List[ReleaseType], PineDeferred, None],
"is_managed_by__service_instance": Union[List[ServiceInstanceType], PineDeferred, None],
"should_be_managed_by__supervisor_release": Union[List[SupervisorReleaseType], PineDeferred, None],
- "device_config_variable": Union[List[EnvironmentVariableBase], None],
- "device_environment_variable": Union[List[EnvironmentVariableBase], None],
- "device_tag": Union[List[BaseTagType], None],
- "service_install": Union[List[ServiceInstanceType], None],
- "image_install": Union[List[ImageInstallType], None]
+ "device_config_variable": Optional[List[EnvironmentVariableBase]],
+ "device_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "device_tag": Optional[List[BaseTagType]],
+ "service_install": Optional[List[ServiceInstanceType]],
+ "image_install": Optional[List[ImageInstallType]]
}
```
@@ -4752,11 +4757,11 @@ The name must be a string; the optional doc argument can have any type.
"should_be_running__release": Union[List[ReleaseType], PineDeferred, None],
"is_managed_by__service_instance": Union[List[ServiceInstanceType], PineDeferred, None],
"should_be_managed_by__supervisor_release": Union[List[SupervisorReleaseType], PineDeferred, None],
- "device_config_variable": Union[List[EnvironmentVariableBase], None],
- "device_environment_variable": Union[List[EnvironmentVariableBase], None],
- "device_tag": Union[List[BaseTagType], None],
- "service_install": Union[List[ServiceInstanceType], None],
- "image_install": Union[List[ImageInstallType], None],
+ "device_config_variable": Optional[List[EnvironmentVariableBase]],
+ "device_environment_variable": Optional[List[EnvironmentVariableBase]],
+ "device_tag": Optional[List[BaseTagType]],
+ "service_install": Optional[List[ServiceInstanceType]],
+ "image_install": Optional[List[ImageInstallType]],
"current_services": Dict[str, List[TypeCurrentService]]
}
```
@@ -4791,10 +4796,10 @@ The name must be a string; the optional doc argument can have any type.
"actor": Union[List[ActorType], int],
"created_at": str,
"username": str,
- "organization_membership": Union[List[OrganizationMembershipType], None],
- "user_application_membership": Union[List[ApplicationMembershipType], None],
- "team_membership": Union[List[TeamMembershipType], None],
- "has_direct_access_to__application": Union[List[TypeApplication], None]
+ "organization_membership": Optional[List[OrganizationMembershipType]],
+ "user_application_membership": Optional[List[ApplicationMembershipType]],
+ "team_membership": Optional[List[TeamMembershipType]],
+ "has_direct_access_to__application": Optional[List[TypeApplication]]
}
```
diff --git a/balena/models/application.py b/balena/models/application.py
index 7c0d0f67..215f99c7 100644
--- a/balena/models/application.py
+++ b/balena/models/application.py
@@ -1038,9 +1038,10 @@ def remove(self, slug_or_uuid_or_id: Union[str, int], key: str) -> None:
Args:
slug_or_uuid_or_id (Union[str, int]): application slug (string), uuid (string) or id (number)
+ key (str): environment variable name.
Examples:
- >>> balena.models.application.config_var.remove(2184)
+ >>> balena.models.application.config_var.remove(2184, 'test_env')
"""
super(ApplicationConfigVariable, self)._remove(slug_or_uuid_or_id, key)
@@ -1113,9 +1114,10 @@ def remove(self, slug_or_uuid_or_id: Union[str, int], key: str) -> None:
Args:
slug_or_uuid_or_id (Union[str, int]): application slug (string), uuid (string) or id (number)
+ key (str): environment variable name.
Examples:
- >>> balena.models.application.env_var.remove(2184)
+ >>> balena.models.application.env_var.remove(2184,'test_env4')
"""
super(ApplicationEnvVariable, self)._remove(slug_or_uuid_or_id, key)
@@ -1188,9 +1190,10 @@ def remove(self, slug_or_uuid_or_id: Union[str, int], key: str) -> None:
Args:
slug_or_uuid_or_id (Union[str, int]): application slug (string), uuid (string) or id (number)
+ key (str): environment variable name.
Examples:
- >>> balena.models.application.build_var.remove(2184)
+ >>> balena.models.application.build_var.remove(2184, 'test_env4')
"""
super(BuildEnvVariable, self)._remove(slug_or_uuid_or_id, key)
diff --git a/balena/models/device.py b/balena/models/device.py
index 1efa66ca..e5380e66 100644
--- a/balena/models/device.py
+++ b/balena/models/device.py
@@ -2181,9 +2181,10 @@ def remove(self, uuid_or_id: Union[str, int], key: str) -> None:
Args:
uuid_or_id (Union[str, int]): device uuid (string) or id (int)
+ key (str): environment variable name.
Examples:
- >>> balena.models.device.config_var.device.remove(2184)
+ >>> balena.models.device.config_var.device.remove(2184, 'test_env4')
"""
super(DeviceConfigVariable, self)._remove(uuid_or_id, key)
@@ -2268,7 +2269,7 @@ def get(self, uuid_or_id: Union[str, int], env_var_name: str) -> Optional[str]:
env_var_name (str): environment variable name.
Examples:
- >>> balena.models.device.env_var.get('8deb12','test_env4')
+ >>> balena.models.device.env_var.get('8deb12', 'test_env4')
"""
return super(DeviceEnvVariable, self)._get(uuid_or_id, env_var_name)
@@ -2282,7 +2283,7 @@ def set(self, uuid_or_id: Union[str, int], env_var_name: str, value: str) -> Non
value (str): environment variable value.
Examples:
- >>> balena.models.device.env_var.set('8deb12','test_env4', 'testing1')
+ >>> balena.models.device.env_var.set('8deb12', 'test_env4', 'testing1')
"""
super(DeviceEnvVariable, self)._set(uuid_or_id, env_var_name, value)
@@ -2292,9 +2293,10 @@ def remove(self, uuid_or_id: Union[str, int], key: str) -> None:
Args:
uuid_or_id (Union[str, int]): device uuid (string) or id (int)
+ key (str): environment variable name.
Examples:
- >>> balena.models.device.env_var.remove(2184)
+ >>> balena.models.device.env_var.remove(2184, 'test_env4')
"""
super(DeviceEnvVariable, self)._remove(uuid_or_id, key)