From e7e229a63222ff620b9b3ab9e80ae7955e79c893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Sun, 3 Nov 2024 21:31:13 +0100 Subject: [PATCH 1/4] move docker engine api into main source code --- lib/docker/impl/api/config.ex | 191 ++++ lib/docker/impl/api/container.ex | 997 ++++++++++++++++++ lib/docker/impl/api/distribution.ex | 43 + lib/docker/impl/api/exec.ex | 159 +++ lib/docker/impl/api/image.ex | 659 ++++++++++++ lib/docker/impl/api/network.ex | 255 +++++ lib/docker/impl/api/node.ex | 159 +++ lib/docker/impl/api/plugin.ex | 416 ++++++++ lib/docker/impl/api/secret.ex | 191 ++++ lib/docker/impl/api/service.ex | 258 +++++ lib/docker/impl/api/session.ex | 43 + lib/docker/impl/api/swarm.ex | 252 +++++ lib/docker/impl/api/system.ex | 245 +++++ lib/docker/impl/api/task.ex | 130 +++ lib/docker/impl/api/volume.ex | 225 ++++ lib/docker/impl/connection.ex | 99 ++ lib/docker/impl/deserializer.ex | 114 ++ lib/docker/impl/model/address.ex | 24 + lib/docker/impl/model/auth_config.ex | 28 + lib/docker/impl/model/build_cache.ex | 42 + lib/docker/impl/model/build_info.ex | 41 + lib/docker/impl/model/build_prune_response.ex | 24 + lib/docker/impl/model/change_type.ex | 22 + lib/docker/impl/model/cluster_info.ex | 45 + lib/docker/impl/model/cluster_volume.ex | 40 + lib/docker/impl/model/cluster_volume_info.ex | 28 + .../cluster_volume_publish_status_inner.ex | 26 + lib/docker/impl/model/cluster_volume_spec.ex | 27 + .../model/cluster_volume_spec_access_mode.ex | 39 + ..._access_mode_accessibility_requirements.ex | 24 + ..._volume_spec_access_mode_capacity_range.ex | 24 + ...r_volume_spec_access_mode_secrets_inner.ex | 24 + lib/docker/impl/model/commit.ex | 24 + lib/docker/impl/model/config.ex | 34 + .../impl/model/config_create_request.ex | 31 + lib/docker/impl/model/config_spec.ex | 31 + lib/docker/impl/model/container_config.ex | 73 ++ .../impl/model/container_create_request.ex | 79 ++ .../impl/model/container_create_response.ex | 24 + .../impl/model/container_inspect_response.ex | 78 ++ .../impl/model/container_prune_response.ex | 24 + lib/docker/impl/model/container_state.ex | 47 + lib/docker/impl/model/container_summary.ex | 56 + .../model/container_summary_host_config.ex | 22 + .../container_summary_network_settings.ex | 25 + .../impl/model/container_top_response.ex | 24 + .../impl/model/container_update_request.ex | 95 ++ .../impl/model/container_update_response.ex | 22 + .../impl/model/container_wait_exit_error.ex | 22 + .../impl/model/container_wait_response.ex | 27 + lib/docker/impl/model/create_image_info.ex | 36 + lib/docker/impl/model/device_mapping.ex | 26 + lib/docker/impl/model/device_request.ex | 30 + lib/docker/impl/model/distribution_inspect.ex | 28 + lib/docker/impl/model/driver.ex | 24 + lib/docker/impl/model/endpoint_ipam_config.ex | 26 + lib/docker/impl/model/endpoint_port_config.ex | 30 + lib/docker/impl/model/endpoint_settings.ex | 49 + lib/docker/impl/model/endpoint_spec.ex | 27 + lib/docker/impl/model/engine_description.ex | 29 + .../model/engine_description_plugins_inner.ex | 24 + lib/docker/impl/model/error_detail.ex | 24 + lib/docker/impl/model/error_response.ex | 22 + lib/docker/impl/model/event_actor.ex | 24 + lib/docker/impl/model/event_message.ex | 35 + lib/docker/impl/model/exec_config.ex | 42 + .../impl/model/exec_inspect_response.ex | 45 + lib/docker/impl/model/exec_start_config.ex | 26 + lib/docker/impl/model/filesystem_change.ex | 27 + .../impl/model/generic_resources_inner.ex | 28 + ..._resources_inner_discrete_resource_spec.ex | 24 + ...ric_resources_inner_named_resource_spec.ex | 24 + lib/docker/impl/model/graph_driver_data.ex | 24 + lib/docker/impl/model/health.ex | 29 + lib/docker/impl/model/health_config.ex | 30 + lib/docker/impl/model/healthcheck_result.ex | 31 + .../impl/model/history_response_item.ex | 32 + lib/docker/impl/model/host_config.ex | 173 +++ .../model/host_config_all_of_log_config.ex | 24 + lib/docker/impl/model/id_response.ex | 22 + .../impl/model/image_delete_response_item.ex | 24 + lib/docker/impl/model/image_id.ex | 22 + lib/docker/impl/model/image_inspect.ex | 67 ++ .../impl/model/image_inspect_metadata.ex | 22 + .../impl/model/image_inspect_root_fs.ex | 24 + lib/docker/impl/model/image_prune_response.ex | 27 + .../impl/model/image_search_response_item.ex | 30 + lib/docker/impl/model/image_summary.ex | 40 + lib/docker/impl/model/index_info.ex | 28 + lib/docker/impl/model/ipam.ex | 29 + lib/docker/impl/model/ipam_config.ex | 28 + lib/docker/impl/model/join_tokens.ex | 24 + lib/docker/impl/model/limit.ex | 26 + lib/docker/impl/model/local_node_state.ex | 22 + lib/docker/impl/model/manager_status.ex | 29 + lib/docker/impl/model/mount.ex | 41 + lib/docker/impl/model/mount_bind_options.ex | 26 + lib/docker/impl/model/mount_point.ex | 36 + lib/docker/impl/model/mount_tmpfs_options.ex | 24 + lib/docker/impl/model/mount_volume_options.ex | 29 + .../mount_volume_options_driver_config.ex | 24 + lib/docker/impl/model/network.ex | 50 + .../impl/model/network_attachment_config.ex | 26 + .../impl/model/network_connect_request.ex | 27 + lib/docker/impl/model/network_container.ex | 30 + .../impl/model/network_create_request.ex | 43 + .../impl/model/network_create_response.ex | 24 + .../impl/model/network_disconnect_request.ex | 24 + .../impl/model/network_prune_response.ex | 22 + lib/docker/impl/model/network_settings.ex | 61 ++ lib/docker/impl/model/networking_config.ex | 25 + lib/docker/impl/model/node.ex | 43 + lib/docker/impl/model/node_description.ex | 36 + lib/docker/impl/model/node_spec.ex | 28 + lib/docker/impl/model/node_state.ex | 22 + lib/docker/impl/model/node_status.ex | 29 + lib/docker/impl/model/object_version.ex | 22 + lib/docker/impl/model/oci_descriptor.ex | 26 + lib/docker/impl/model/oci_platform.ex | 30 + lib/docker/impl/model/peer_node.ex | 24 + lib/docker/impl/model/platform.ex | 24 + lib/docker/impl/model/plugin.ex | 36 + lib/docker/impl/model/plugin_config.ex | 62 ++ lib/docker/impl/model/plugin_config_args.ex | 28 + .../impl/model/plugin_config_interface.ex | 29 + lib/docker/impl/model/plugin_config_linux.ex | 29 + .../impl/model/plugin_config_network.ex | 22 + lib/docker/impl/model/plugin_config_rootfs.ex | 24 + lib/docker/impl/model/plugin_config_user.ex | 24 + lib/docker/impl/model/plugin_device.ex | 28 + lib/docker/impl/model/plugin_env.ex | 28 + .../impl/model/plugin_interface_type.ex | 26 + lib/docker/impl/model/plugin_mount.ex | 34 + lib/docker/impl/model/plugin_privilege.ex | 26 + lib/docker/impl/model/plugin_settings.ex | 32 + lib/docker/impl/model/plugins_info.ex | 28 + lib/docker/impl/model/port.ex | 28 + lib/docker/impl/model/port_binding.ex | 24 + lib/docker/impl/model/process_config.ex | 30 + lib/docker/impl/model/progress_detail.ex | 24 + lib/docker/impl/model/push_image_info.ex | 31 + lib/docker/impl/model/reachability.ex | 22 + .../impl/model/registry_service_config.ex | 33 + lib/docker/impl/model/resource_object.ex | 29 + lib/docker/impl/model/resources.ex | 92 ++ .../resources_blkio_weight_device_inner.ex | 24 + .../impl/model/resources_ulimits_inner.ex | 26 + lib/docker/impl/model/restart_policy.ex | 24 + lib/docker/impl/model/runtime.ex | 24 + lib/docker/impl/model/secret.ex | 34 + .../impl/model/secret_create_request.ex | 34 + lib/docker/impl/model/secret_spec.ex | 34 + lib/docker/impl/model/service.ex | 46 + .../impl/model/service_create_request.ex | 44 + .../impl/model/service_create_response.ex | 24 + lib/docker/impl/model/service_endpoint.ex | 31 + .../service_endpoint_virtual_ips_inner.ex | 24 + lib/docker/impl/model/service_job_status.ex | 27 + .../impl/model/service_service_status.ex | 26 + lib/docker/impl/model/service_spec.ex | 44 + lib/docker/impl/model/service_spec_mode.ex | 32 + .../model/service_spec_mode_replicated.ex | 22 + .../model/service_spec_mode_replicated_job.ex | 24 + .../model/service_spec_rollback_config.ex | 32 + .../impl/model/service_spec_update_config.ex | 32 + .../impl/model/service_update_request.ex | 44 + .../impl/model/service_update_response.ex | 22 + .../impl/model/service_update_status.ex | 28 + lib/docker/impl/model/swarm.ex | 48 + lib/docker/impl/model/swarm_info.ex | 43 + lib/docker/impl/model/swarm_init_request.ex | 39 + lib/docker/impl/model/swarm_join_request.ex | 30 + lib/docker/impl/model/swarm_spec.ex | 44 + lib/docker/impl/model/swarm_spec_ca_config.ex | 33 + ...swarm_spec_ca_config_external_cas_inner.ex | 28 + .../impl/model/swarm_spec_dispatcher.ex | 22 + .../model/swarm_spec_encryption_config.ex | 22 + .../impl/model/swarm_spec_orchestration.ex | 22 + lib/docker/impl/model/swarm_spec_raft.ex | 30 + .../impl/model/swarm_spec_task_defaults.ex | 25 + .../swarm_spec_task_defaults_log_driver.ex | 24 + lib/docker/impl/model/swarm_unlock_request.ex | 22 + lib/docker/impl/model/system_auth_response.ex | 24 + .../impl/model/system_data_usage_response.ex | 36 + lib/docker/impl/model/system_info.ex | 151 +++ ...system_info_default_address_pools_inner.ex | 24 + lib/docker/impl/model/system_version.ex | 48 + .../model/system_version_components_inner.ex | 26 + .../impl/model/system_version_platform.ex | 22 + lib/docker/impl/model/task.ex | 56 + lib/docker/impl/model/task_spec.ex | 50 + .../impl/model/task_spec_container_spec.ex | 83 ++ .../task_spec_container_spec_configs_inner.ex | 31 + ..._spec_container_spec_configs_inner_file.ex | 28 + .../task_spec_container_spec_dns_config.ex | 26 + .../task_spec_container_spec_privileges.ex | 28 + ...ntainer_spec_privileges_credential_spec.ex | 26 + ...tainer_spec_privileges_se_linux_context.ex | 30 + .../task_spec_container_spec_secrets_inner.ex | 29 + ..._spec_container_spec_secrets_inner_file.ex | 28 + lib/docker/impl/model/task_spec_log_driver.ex | 24 + .../task_spec_network_attachment_spec.ex | 22 + lib/docker/impl/model/task_spec_placement.ex | 32 + .../task_spec_placement_preferences_inner.ex | 25 + ...spec_placement_preferences_inner_spread.ex | 22 + .../impl/model/task_spec_plugin_spec.ex | 31 + lib/docker/impl/model/task_spec_resources.ex | 28 + .../impl/model/task_spec_restart_policy.ex | 28 + lib/docker/impl/model/task_state.ex | 22 + lib/docker/impl/model/task_status.ex | 34 + .../model/task_status_container_status.ex | 26 + lib/docker/impl/model/throttle_device.ex | 24 + lib/docker/impl/model/tls_info.ex | 26 + lib/docker/impl/model/unlock_key_response.ex | 22 + lib/docker/impl/model/volume.ex | 44 + .../impl/model/volume_create_options.ex | 33 + lib/docker/impl/model/volume_list_response.ex | 27 + .../impl/model/volume_prune_response.ex | 24 + .../impl/model/volume_update_request.ex | 25 + lib/docker/impl/model/volume_usage_data.ex | 24 + lib/docker/impl/request_builder.ex | 197 ++++ mix.exs | 5 +- mix.lock | 1 - 223 files changed, 11277 insertions(+), 3 deletions(-) create mode 100644 lib/docker/impl/api/config.ex create mode 100644 lib/docker/impl/api/container.ex create mode 100644 lib/docker/impl/api/distribution.ex create mode 100644 lib/docker/impl/api/exec.ex create mode 100644 lib/docker/impl/api/image.ex create mode 100644 lib/docker/impl/api/network.ex create mode 100644 lib/docker/impl/api/node.ex create mode 100644 lib/docker/impl/api/plugin.ex create mode 100644 lib/docker/impl/api/secret.ex create mode 100644 lib/docker/impl/api/service.ex create mode 100644 lib/docker/impl/api/session.ex create mode 100644 lib/docker/impl/api/swarm.ex create mode 100644 lib/docker/impl/api/system.ex create mode 100644 lib/docker/impl/api/task.ex create mode 100644 lib/docker/impl/api/volume.ex create mode 100644 lib/docker/impl/connection.ex create mode 100644 lib/docker/impl/deserializer.ex create mode 100644 lib/docker/impl/model/address.ex create mode 100644 lib/docker/impl/model/auth_config.ex create mode 100644 lib/docker/impl/model/build_cache.ex create mode 100644 lib/docker/impl/model/build_info.ex create mode 100644 lib/docker/impl/model/build_prune_response.ex create mode 100644 lib/docker/impl/model/change_type.ex create mode 100644 lib/docker/impl/model/cluster_info.ex create mode 100644 lib/docker/impl/model/cluster_volume.ex create mode 100644 lib/docker/impl/model/cluster_volume_info.ex create mode 100644 lib/docker/impl/model/cluster_volume_publish_status_inner.ex create mode 100644 lib/docker/impl/model/cluster_volume_spec.ex create mode 100644 lib/docker/impl/model/cluster_volume_spec_access_mode.ex create mode 100644 lib/docker/impl/model/cluster_volume_spec_access_mode_accessibility_requirements.ex create mode 100644 lib/docker/impl/model/cluster_volume_spec_access_mode_capacity_range.ex create mode 100644 lib/docker/impl/model/cluster_volume_spec_access_mode_secrets_inner.ex create mode 100644 lib/docker/impl/model/commit.ex create mode 100644 lib/docker/impl/model/config.ex create mode 100644 lib/docker/impl/model/config_create_request.ex create mode 100644 lib/docker/impl/model/config_spec.ex create mode 100644 lib/docker/impl/model/container_config.ex create mode 100644 lib/docker/impl/model/container_create_request.ex create mode 100644 lib/docker/impl/model/container_create_response.ex create mode 100644 lib/docker/impl/model/container_inspect_response.ex create mode 100644 lib/docker/impl/model/container_prune_response.ex create mode 100644 lib/docker/impl/model/container_state.ex create mode 100644 lib/docker/impl/model/container_summary.ex create mode 100644 lib/docker/impl/model/container_summary_host_config.ex create mode 100644 lib/docker/impl/model/container_summary_network_settings.ex create mode 100644 lib/docker/impl/model/container_top_response.ex create mode 100644 lib/docker/impl/model/container_update_request.ex create mode 100644 lib/docker/impl/model/container_update_response.ex create mode 100644 lib/docker/impl/model/container_wait_exit_error.ex create mode 100644 lib/docker/impl/model/container_wait_response.ex create mode 100644 lib/docker/impl/model/create_image_info.ex create mode 100644 lib/docker/impl/model/device_mapping.ex create mode 100644 lib/docker/impl/model/device_request.ex create mode 100644 lib/docker/impl/model/distribution_inspect.ex create mode 100644 lib/docker/impl/model/driver.ex create mode 100644 lib/docker/impl/model/endpoint_ipam_config.ex create mode 100644 lib/docker/impl/model/endpoint_port_config.ex create mode 100644 lib/docker/impl/model/endpoint_settings.ex create mode 100644 lib/docker/impl/model/endpoint_spec.ex create mode 100644 lib/docker/impl/model/engine_description.ex create mode 100644 lib/docker/impl/model/engine_description_plugins_inner.ex create mode 100644 lib/docker/impl/model/error_detail.ex create mode 100644 lib/docker/impl/model/error_response.ex create mode 100644 lib/docker/impl/model/event_actor.ex create mode 100644 lib/docker/impl/model/event_message.ex create mode 100644 lib/docker/impl/model/exec_config.ex create mode 100644 lib/docker/impl/model/exec_inspect_response.ex create mode 100644 lib/docker/impl/model/exec_start_config.ex create mode 100644 lib/docker/impl/model/filesystem_change.ex create mode 100644 lib/docker/impl/model/generic_resources_inner.ex create mode 100644 lib/docker/impl/model/generic_resources_inner_discrete_resource_spec.ex create mode 100644 lib/docker/impl/model/generic_resources_inner_named_resource_spec.ex create mode 100644 lib/docker/impl/model/graph_driver_data.ex create mode 100644 lib/docker/impl/model/health.ex create mode 100644 lib/docker/impl/model/health_config.ex create mode 100644 lib/docker/impl/model/healthcheck_result.ex create mode 100644 lib/docker/impl/model/history_response_item.ex create mode 100644 lib/docker/impl/model/host_config.ex create mode 100644 lib/docker/impl/model/host_config_all_of_log_config.ex create mode 100644 lib/docker/impl/model/id_response.ex create mode 100644 lib/docker/impl/model/image_delete_response_item.ex create mode 100644 lib/docker/impl/model/image_id.ex create mode 100644 lib/docker/impl/model/image_inspect.ex create mode 100644 lib/docker/impl/model/image_inspect_metadata.ex create mode 100644 lib/docker/impl/model/image_inspect_root_fs.ex create mode 100644 lib/docker/impl/model/image_prune_response.ex create mode 100644 lib/docker/impl/model/image_search_response_item.ex create mode 100644 lib/docker/impl/model/image_summary.ex create mode 100644 lib/docker/impl/model/index_info.ex create mode 100644 lib/docker/impl/model/ipam.ex create mode 100644 lib/docker/impl/model/ipam_config.ex create mode 100644 lib/docker/impl/model/join_tokens.ex create mode 100644 lib/docker/impl/model/limit.ex create mode 100644 lib/docker/impl/model/local_node_state.ex create mode 100644 lib/docker/impl/model/manager_status.ex create mode 100644 lib/docker/impl/model/mount.ex create mode 100644 lib/docker/impl/model/mount_bind_options.ex create mode 100644 lib/docker/impl/model/mount_point.ex create mode 100644 lib/docker/impl/model/mount_tmpfs_options.ex create mode 100644 lib/docker/impl/model/mount_volume_options.ex create mode 100644 lib/docker/impl/model/mount_volume_options_driver_config.ex create mode 100644 lib/docker/impl/model/network.ex create mode 100644 lib/docker/impl/model/network_attachment_config.ex create mode 100644 lib/docker/impl/model/network_connect_request.ex create mode 100644 lib/docker/impl/model/network_container.ex create mode 100644 lib/docker/impl/model/network_create_request.ex create mode 100644 lib/docker/impl/model/network_create_response.ex create mode 100644 lib/docker/impl/model/network_disconnect_request.ex create mode 100644 lib/docker/impl/model/network_prune_response.ex create mode 100644 lib/docker/impl/model/network_settings.ex create mode 100644 lib/docker/impl/model/networking_config.ex create mode 100644 lib/docker/impl/model/node.ex create mode 100644 lib/docker/impl/model/node_description.ex create mode 100644 lib/docker/impl/model/node_spec.ex create mode 100644 lib/docker/impl/model/node_state.ex create mode 100644 lib/docker/impl/model/node_status.ex create mode 100644 lib/docker/impl/model/object_version.ex create mode 100644 lib/docker/impl/model/oci_descriptor.ex create mode 100644 lib/docker/impl/model/oci_platform.ex create mode 100644 lib/docker/impl/model/peer_node.ex create mode 100644 lib/docker/impl/model/platform.ex create mode 100644 lib/docker/impl/model/plugin.ex create mode 100644 lib/docker/impl/model/plugin_config.ex create mode 100644 lib/docker/impl/model/plugin_config_args.ex create mode 100644 lib/docker/impl/model/plugin_config_interface.ex create mode 100644 lib/docker/impl/model/plugin_config_linux.ex create mode 100644 lib/docker/impl/model/plugin_config_network.ex create mode 100644 lib/docker/impl/model/plugin_config_rootfs.ex create mode 100644 lib/docker/impl/model/plugin_config_user.ex create mode 100644 lib/docker/impl/model/plugin_device.ex create mode 100644 lib/docker/impl/model/plugin_env.ex create mode 100644 lib/docker/impl/model/plugin_interface_type.ex create mode 100644 lib/docker/impl/model/plugin_mount.ex create mode 100644 lib/docker/impl/model/plugin_privilege.ex create mode 100644 lib/docker/impl/model/plugin_settings.ex create mode 100644 lib/docker/impl/model/plugins_info.ex create mode 100644 lib/docker/impl/model/port.ex create mode 100644 lib/docker/impl/model/port_binding.ex create mode 100644 lib/docker/impl/model/process_config.ex create mode 100644 lib/docker/impl/model/progress_detail.ex create mode 100644 lib/docker/impl/model/push_image_info.ex create mode 100644 lib/docker/impl/model/reachability.ex create mode 100644 lib/docker/impl/model/registry_service_config.ex create mode 100644 lib/docker/impl/model/resource_object.ex create mode 100644 lib/docker/impl/model/resources.ex create mode 100644 lib/docker/impl/model/resources_blkio_weight_device_inner.ex create mode 100644 lib/docker/impl/model/resources_ulimits_inner.ex create mode 100644 lib/docker/impl/model/restart_policy.ex create mode 100644 lib/docker/impl/model/runtime.ex create mode 100644 lib/docker/impl/model/secret.ex create mode 100644 lib/docker/impl/model/secret_create_request.ex create mode 100644 lib/docker/impl/model/secret_spec.ex create mode 100644 lib/docker/impl/model/service.ex create mode 100644 lib/docker/impl/model/service_create_request.ex create mode 100644 lib/docker/impl/model/service_create_response.ex create mode 100644 lib/docker/impl/model/service_endpoint.ex create mode 100644 lib/docker/impl/model/service_endpoint_virtual_ips_inner.ex create mode 100644 lib/docker/impl/model/service_job_status.ex create mode 100644 lib/docker/impl/model/service_service_status.ex create mode 100644 lib/docker/impl/model/service_spec.ex create mode 100644 lib/docker/impl/model/service_spec_mode.ex create mode 100644 lib/docker/impl/model/service_spec_mode_replicated.ex create mode 100644 lib/docker/impl/model/service_spec_mode_replicated_job.ex create mode 100644 lib/docker/impl/model/service_spec_rollback_config.ex create mode 100644 lib/docker/impl/model/service_spec_update_config.ex create mode 100644 lib/docker/impl/model/service_update_request.ex create mode 100644 lib/docker/impl/model/service_update_response.ex create mode 100644 lib/docker/impl/model/service_update_status.ex create mode 100644 lib/docker/impl/model/swarm.ex create mode 100644 lib/docker/impl/model/swarm_info.ex create mode 100644 lib/docker/impl/model/swarm_init_request.ex create mode 100644 lib/docker/impl/model/swarm_join_request.ex create mode 100644 lib/docker/impl/model/swarm_spec.ex create mode 100644 lib/docker/impl/model/swarm_spec_ca_config.ex create mode 100644 lib/docker/impl/model/swarm_spec_ca_config_external_cas_inner.ex create mode 100644 lib/docker/impl/model/swarm_spec_dispatcher.ex create mode 100644 lib/docker/impl/model/swarm_spec_encryption_config.ex create mode 100644 lib/docker/impl/model/swarm_spec_orchestration.ex create mode 100644 lib/docker/impl/model/swarm_spec_raft.ex create mode 100644 lib/docker/impl/model/swarm_spec_task_defaults.ex create mode 100644 lib/docker/impl/model/swarm_spec_task_defaults_log_driver.ex create mode 100644 lib/docker/impl/model/swarm_unlock_request.ex create mode 100644 lib/docker/impl/model/system_auth_response.ex create mode 100644 lib/docker/impl/model/system_data_usage_response.ex create mode 100644 lib/docker/impl/model/system_info.ex create mode 100644 lib/docker/impl/model/system_info_default_address_pools_inner.ex create mode 100644 lib/docker/impl/model/system_version.ex create mode 100644 lib/docker/impl/model/system_version_components_inner.ex create mode 100644 lib/docker/impl/model/system_version_platform.ex create mode 100644 lib/docker/impl/model/task.ex create mode 100644 lib/docker/impl/model/task_spec.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_configs_inner.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_configs_inner_file.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_dns_config.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_privileges.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_privileges_credential_spec.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_privileges_se_linux_context.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_secrets_inner.ex create mode 100644 lib/docker/impl/model/task_spec_container_spec_secrets_inner_file.ex create mode 100644 lib/docker/impl/model/task_spec_log_driver.ex create mode 100644 lib/docker/impl/model/task_spec_network_attachment_spec.ex create mode 100644 lib/docker/impl/model/task_spec_placement.ex create mode 100644 lib/docker/impl/model/task_spec_placement_preferences_inner.ex create mode 100644 lib/docker/impl/model/task_spec_placement_preferences_inner_spread.ex create mode 100644 lib/docker/impl/model/task_spec_plugin_spec.ex create mode 100644 lib/docker/impl/model/task_spec_resources.ex create mode 100644 lib/docker/impl/model/task_spec_restart_policy.ex create mode 100644 lib/docker/impl/model/task_state.ex create mode 100644 lib/docker/impl/model/task_status.ex create mode 100644 lib/docker/impl/model/task_status_container_status.ex create mode 100644 lib/docker/impl/model/throttle_device.ex create mode 100644 lib/docker/impl/model/tls_info.ex create mode 100644 lib/docker/impl/model/unlock_key_response.ex create mode 100644 lib/docker/impl/model/volume.ex create mode 100644 lib/docker/impl/model/volume_create_options.ex create mode 100644 lib/docker/impl/model/volume_list_response.ex create mode 100644 lib/docker/impl/model/volume_prune_response.ex create mode 100644 lib/docker/impl/model/volume_update_request.ex create mode 100644 lib/docker/impl/model/volume_usage_data.ex create mode 100644 lib/docker/impl/request_builder.ex diff --git a/lib/docker/impl/api/config.ex b/lib/docker/impl/api/config.ex new file mode 100644 index 0000000..91b3633 --- /dev/null +++ b/lib/docker/impl/api/config.ex @@ -0,0 +1,191 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Config do + @moduledoc """ + API calls for all endpoints tagged `Config`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Create a config + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:body` (ConfigCreateRequest): + + ### Returns + + - `{:ok, DockerEngineAPI.Model.IdResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec config_create(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.IdResponse.t} | {:error, Tesla.Env.t} + def config_create(connection, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/configs/create") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.IdResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete a config + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID of the config + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec config_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def config_delete(connection, id, _opts \\ []) do + request = + %{} + |> method(:delete) + |> url("/configs/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a config + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID of the config + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Config.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec config_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.Config.t} | {:error, Tesla.Env.t} + def config_inspect(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/configs/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Config}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List configs + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters: - `id=` - `label= or label==value` - `name=` - `names=` + + ### Returns + + - `{:ok, [%Config{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec config_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.Config.t)} | {:error, Tesla.Env.t} + def config_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/configs") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Config}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Update a Config + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): The ID or name of the config + - `version` (integer()): The version number of the config object being updated. This is required to avoid conflicting writes. + - `opts` (keyword): Optional parameters + - `:body` (ConfigSpec): The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec config_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def config_update(connection, id, version, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/configs/#{id}/update") + |> add_param(:query, :version, version) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/container.ex b/lib/docker/impl/api/container.ex new file mode 100644 index 0000000..c3719b5 --- /dev/null +++ b/lib/docker/impl/api/container.ex @@ -0,0 +1,997 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Container do + @moduledoc """ + API calls for all endpoints tagged `Container`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Get an archive of a filesystem resource in a container + Get a tar archive of a resource in the filesystem of container id. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `path` (String.t): Resource in the container’s filesystem to archive. + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_archive(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_archive(connection, id, path, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/containers/#{id}/archive") + |> add_param(:query, :path, path) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get information about files in a container + A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `path` (String.t): Resource in the container’s filesystem to archive. + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_archive_info(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_archive_info(connection, id, path, _opts \\ []) do + request = + %{} + |> method(:head) + |> url("/containers/#{id}/archive") + |> add_param(:query, :path, path) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Attach to a container + Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. ### Hijacking This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. This is the response from the daemon for an attach request: ``` HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream [STREAM] ``` After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: ``` POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 Upgrade: tcp Connection: Upgrade ``` The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Content-Type: application/vnd.docker.raw-stream Connection: Upgrade Upgrade: tcp [STREAM] ``` ### Stream format When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream and the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). It is encoded on the first eight bytes like this: ```go header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} ``` `STREAM_TYPE` can be: - 0: `stdin` (is written on `stdout`) - 1: `stdout` - 2: `stderr` `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: 1. Read 8 bytes. 2. Choose `stdout` or `stderr` depending on the first byte. 3. Extract the frame size from the last four bytes. 4. Read the extracted size and output it on the correct output. 5. Goto 1. ### Stream format when using a TTY When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:detachKeys` (String.t): Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + - `:logs` (boolean()): Replay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + - `:stream` (boolean()): Stream attached streams from the time the request was made onwards. + - `:stdin` (boolean()): Attach to `stdin` + - `:stdout` (boolean()): Attach to `stdout` + - `:stderr` (boolean()): Attach to `stderr` + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_attach(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_attach(connection, id, opts \\ []) do + optional_params = %{ + :detachKeys => :query, + :logs => :query, + :stream => :query, + :stdin => :query, + :stdout => :query, + :stderr => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/attach") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {101, false}, + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Attach to a container via a websocket + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:detachKeys` (String.t): Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. + - `:logs` (boolean()): Return logs + - `:stream` (boolean()): Return stream + - `:stdin` (boolean()): Attach to `stdin` + - `:stdout` (boolean()): Attach to `stdout` + - `:stderr` (boolean()): Attach to `stderr` + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_attach_websocket(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_attach_websocket(connection, id, opts \\ []) do + optional_params = %{ + :detachKeys => :query, + :logs => :query, + :stream => :query, + :stdin => :query, + :stdout => :query, + :stderr => :query + } + + request = + %{} + |> method(:get) + |> url("/containers/#{id}/attach/ws") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {101, false}, + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get changes on a container’s filesystem + Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: - `0`: Modified (\"C\") - `1`: Added (\"A\") - `2`: Deleted (\"D\") + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, [%FilesystemChange{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_changes(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.FilesystemChange.t)} | {:error, Tesla.Env.t} + def container_changes(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/containers/#{id}/changes") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.FilesystemChange}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Create a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `body` (ContainerCreateRequest): Container to create + - `opts` (keyword): Optional parameters + - `:name` (String.t): Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + - `:platform` (String.t): Platform in the format `os[/arch[/variant]]` used for image lookup. When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a `404` status. If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the `Warnings` field in the response, for example; WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ContainerCreateResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_create(Tesla.Env.client, DockerEngineAPI.Model.ContainerCreateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerCreateResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_create(connection, body, opts \\ []) do + optional_params = %{ + :name => :query, + :platform => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/create") + |> add_param(:body, :body, body) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.ContainerCreateResponse}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Remove a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:v` (boolean()): Remove anonymous volumes associated with the container. + - `:force` (boolean()): If the container is running, kill it before removing it. + - `:link` (boolean()): Remove the specified link associated with the container. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_delete(connection, id, opts \\ []) do + optional_params = %{ + :v => :query, + :force => :query, + :link => :query + } + + request = + %{} + |> method(:delete) + |> url("/containers/#{id}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Export a container + Export the contents of a container as a tarball. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_export(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_export(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/containers/#{id}/export") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a container + Return low-level information about a container. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:size` (boolean()): Return the size of container as fields `SizeRw` and `SizeRootFs` + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ContainerInspectResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerInspectResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_inspect(connection, id, opts \\ []) do + optional_params = %{ + :size => :query + } + + request = + %{} + |> method(:get) + |> url("/containers/#{id}/json") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ContainerInspectResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Kill a container + Send a POSIX signal to a container, defaulting to killing to the container. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_kill(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_kill(connection, id, opts \\ []) do + optional_params = %{ + :signal => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/kill") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List containers + Returns a list of containers. For details on the format, see the [inspect endpoint](#operation/ContainerInspect). Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated . + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:all` (boolean()): Return all containers. By default, only running containers are shown. + - `:limit` (integer()): Return this number of most recently created containers, including non-running ones. + - `:size` (boolean()): Return the size of container as fields `SizeRw` and `SizeRootFs`. + - `:filters` (String.t): Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{\"status\": [\"paused\"]}` will only return paused containers. Available filters: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - `label=key` or `label=\"key=value\"` of a container label - `name=` a container's name - `network`=(`` or ``) - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) + + ### Returns + + - `{:ok, [%ContainerSummary{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.ContainerSummary.t)} | {:error, Tesla.Env.t} + def container_list(connection, opts \\ []) do + optional_params = %{ + :all => :query, + :limit => :query, + :size => :query, + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/containers/json") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ContainerSummary}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get container logs + Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:follow` (boolean()): Keep connection after returning logs. + - `:stdout` (boolean()): Return logs from `stdout` + - `:stderr` (boolean()): Return logs from `stderr` + - `:since` (integer()): Only return logs since this time, as a UNIX timestamp + - `:until` (integer()): Only return logs before this time, as a UNIX timestamp + - `:timestamps` (boolean()): Add timestamps to every log line + - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def container_logs(connection, id, opts \\ []) do + optional_params = %{ + :follow => :query, + :stdout => :query, + :stderr => :query, + :since => :query, + :until => :query, + :timestamps => :query, + :tail => :query + } + + request = + %{} + |> method(:get) + |> url("/containers/#{id}/logs") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Pause a container + Use the freezer cgroup to suspend all processes in a container. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_pause(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_pause(connection, id, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/containers/#{id}/pause") + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete stopped containers + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ContainerPruneResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.ContainerPruneResponse.t} | {:error, Tesla.Env.t} + def container_prune(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/prune") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ContainerPruneResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Rename a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `name` (String.t): New name for the container + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_rename(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_rename(connection, id, name, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/containers/#{id}/rename") + |> add_param(:query, :name, name) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Resize a container TTY + Resize the TTY for a container. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:h` (integer()): Height of the TTY session in characters + - `:w` (integer()): Width of the TTY session in characters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_resize(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_resize(connection, id, opts \\ []) do + optional_params = %{ + :h => :query, + :w => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/resize") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Restart a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). + - `:t` (integer()): Number of seconds to wait before killing the container + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_restart(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_restart(connection, id, opts \\ []) do + optional_params = %{ + :signal => :query, + :t => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/restart") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Start a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:detachKeys` (String.t): Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_start(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_start(connection, id, opts \\ []) do + optional_params = %{ + :detachKeys => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/start") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {304, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get container stats based on resource usage + This endpoint returns a live stream of a container’s resource usage statistics. The `precpu_stats` is the CPU statistic of the *previous* read, and is used to calculate the CPU usage percentage. It is not an exact copy of the `cpu_stats` field. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is nil then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used. On a cgroup v2 host, the following fields are not set * `blkio_stats`: all fields other than `io_service_bytes_recursive` * `cpu_stats`: `cpu_usage.percpu_usage` * `memory_stats`: `max_usage` and `failcnt` Also, `memory_stats.stats` fields are incompatible with cgroup v1. To calculate the values shown by the `stats` command of the docker cli tool the following formulas can be used: * used_memory = `memory_stats.usage - memory_stats.stats.cache` * available_memory = `memory_stats.limit` * Memory usage % = `(used_memory / available_memory) * 100.0` * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:stream` (boolean()): Stream the output. If false, the stats will be output once and then it will disconnect. + - `:"one-shot"` (boolean()): Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. + + ### Returns + + - `{:ok, map()}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_stats(Tesla.Env.client, String.t, keyword()) :: {:ok, Map.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_stats(connection, id, opts \\ []) do + optional_params = %{ + :stream => :query, + :"one-shot" => :query + } + + request = + %{} + |> method(:get) + |> url("/containers/#{id}/stats") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, %{}}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Stop a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). + - `:t` (integer()): Number of seconds to wait before killing the container + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_stop(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_stop(connection, id, opts \\ []) do + optional_params = %{ + :signal => :query, + :t => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/stop") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {304, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List processes running inside a container + On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:ps_args` (String.t): The arguments to pass to `ps`. For example, `aux` + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ContainerTopResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_top(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerTopResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_top(connection, id, opts \\ []) do + optional_params = %{ + :ps_args => :query + } + + request = + %{} + |> method(:get) + |> url("/containers/#{id}/top") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ContainerTopResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Unpause a container + Resume a container which has been paused. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_unpause(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_unpause(connection, id, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/containers/#{id}/unpause") + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Update a container + Change various configuration options of a container without having to recreate it. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `update` (ContainerUpdateRequest): + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ContainerUpdateResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_update(Tesla.Env.client, String.t, DockerEngineAPI.Model.ContainerUpdateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerUpdateResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_update(connection, id, update, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/containers/#{id}/update") + |> add_param(:body, :body, update) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ContainerUpdateResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Wait for a container + Block until a container stops, then returns the exit code. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `opts` (keyword): Optional parameters + - `:condition` (String.t): Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ContainerWaitResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_wait(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerWaitResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def container_wait(connection, id, opts \\ []) do + optional_params = %{ + :condition => :query + } + + request = + %{} + |> method(:post) + |> url("/containers/#{id}/wait") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ContainerWaitResponse}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Extract an archive of files or folders to a directory in a container + Upload a tar archive to be extracted to a path in the filesystem of container id. `path` parameter is asserted to be a directory. If it exists as a file, 400 error will be returned with message \"not a directory\". + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the container + - `path` (String.t): Path to a directory in the container to extract the archive’s contents into. + - `input_stream` (String.t): The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. + - `opts` (keyword): Optional parameters + - `:noOverwriteDirNonDir` (String.t): If `1`, `true`, or `True` then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. + - `:copyUIDGID` (String.t): If `1`, `true`, then it will copy UID/GID maps to the dest file or dir + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec put_container_archive(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def put_container_archive(connection, id, path, input_stream, opts \\ []) do + optional_params = %{ + :noOverwriteDirNonDir => :query, + :copyUIDGID => :query + } + + request = + %{} + |> method(:put) + |> url("/containers/#{id}/archive") + |> add_param(:query, :path, path) + |> add_param(:body, :body, input_stream) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {403, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/distribution.ex b/lib/docker/impl/api/distribution.ex new file mode 100644 index 0000000..3e34454 --- /dev/null +++ b/lib/docker/impl/api/distribution.ex @@ -0,0 +1,43 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Distribution do + @moduledoc """ + API calls for all endpoints tagged `Distribution`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Get image information from the registry + Return image digest and platform information by contacting the registry. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or id + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.DistributionInspect.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec distribution_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.DistributionInspect.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def distribution_inspect(connection, name, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/distribution/#{name}/json") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.DistributionInspect}, + {401, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/exec.ex b/lib/docker/impl/api/exec.ex new file mode 100644 index 0000000..52846b6 --- /dev/null +++ b/lib/docker/impl/api/exec.ex @@ -0,0 +1,159 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Exec do + @moduledoc """ + API calls for all endpoints tagged `Exec`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Create an exec instance + Run a command inside a running container. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of container + - `exec_config` (ExecConfig): Exec configuration + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.IdResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec container_exec(Tesla.Env.client, String.t, DockerEngineAPI.Model.ExecConfig.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.IdResponse.t} | {:error, Tesla.Env.t} + def container_exec(connection, id, exec_config, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/containers/#{id}/exec") + |> add_param(:body, :body, exec_config) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.IdResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect an exec instance + Return low-level information about an exec instance. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Exec instance ID + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ExecInspectResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec exec_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.ExecInspectResponse.t} | {:error, Tesla.Env.t} + def exec_inspect(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/exec/#{id}/json") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ExecInspectResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Resize an exec instance + Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Exec instance ID + - `opts` (keyword): Optional parameters + - `:h` (integer()): Height of the TTY session in characters + - `:w` (integer()): Width of the TTY session in characters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec exec_resize(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def exec_resize(connection, id, opts \\ []) do + optional_params = %{ + :h => :query, + :w => :query + } + + request = + %{} + |> method(:post) + |> url("/exec/#{id}/resize") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Start an exec instance + Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Exec instance ID + - `opts` (keyword): Optional parameters + - `:body` (ExecStartConfig): + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec exec_start(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def exec_start(connection, id, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/exec/#{id}/start") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/image.ex b/lib/docker/impl/api/image.ex new file mode 100644 index 0000000..748dbbc --- /dev/null +++ b/lib/docker/impl/api/image.ex @@ -0,0 +1,659 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Image do + @moduledoc """ + API calls for all endpoints tagged `Image`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Delete builder cache + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:"keep-storage"` (integer()): Amount of disk space in bytes to keep for cache + - `:all` (boolean()): Remove all types of build cache + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the list of build cache objects. Available filters: - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. - `id=` - `parent=` - `type=` - `description=` - `inuse` - `shared` - `private` + + ### Returns + + - `{:ok, DockerEngineAPI.Model.BuildPruneResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec build_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.BuildPruneResponse.t} | {:error, Tesla.Env.t} + def build_prune(connection, opts \\ []) do + optional_params = %{ + :"keep-storage" => :query, + :all => :query, + :filters => :query + } + + request = + %{} + |> method(:post) + |> url("/build/prune") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.BuildPruneResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Build an image + Build an image from a tar archive with a `Dockerfile` in it. The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. The build is canceled if the client drops the connection by quitting or being killed. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:dockerfile` (String.t): Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`. + - `:t` (String.t): A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters. + - `:extrahosts` (String.t): Extra hosts to add to /etc/hosts + - `:remote` (String.t): A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball. + - `:q` (boolean()): Suppress verbose build output. + - `:nocache` (boolean()): Do not use the cache when building the image. + - `:cachefrom` (String.t): JSON array of images used for build cache resolution. + - `:pull` (String.t): Attempt to pull the image even if an older image exists locally. + - `:rm` (boolean()): Remove intermediate containers after a successful build. + - `:forcerm` (boolean()): Always remove intermediate containers, even upon failure. + - `:memory` (integer()): Set memory limit for build. + - `:memswap` (integer()): Total memory (memory + swap). Set as `-1` to disable swap. + - `:cpushares` (integer()): CPU shares (relative weight). + - `:cpusetcpus` (String.t): CPUs in which to allow execution (e.g., `0-3`, `0,1`). + - `:cpuperiod` (integer()): The length of a CPU period in microseconds. + - `:cpuquota` (integer()): Microseconds of CPU time that the container can get in a CPU period. + - `:buildargs` (String.t): JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. For example, the build arg `FOO=bar` would become `{\"FOO\":\"bar\"}` in JSON. This would result in the query parameter `buildargs={\"FOO\":\"bar\"}`. Note that `{\"FOO\":\"bar\"}` should be URI component encoded. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + - `:shmsize` (integer()): Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. + - `:squash` (boolean()): Squash the resulting images layers into a single layer. *(Experimental release only.)* + - `:labels` (String.t): Arbitrary key/value labels to set on the image, as a JSON map of string pairs. + - `:networkmode` (String.t): Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name or ID to which this container should connect to. + - `:"Content-type"` (String.t): + - `:"X-Registry-Config"` (String.t): This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: ``` { \"docker.example.com\": { \"username\": \"janedoe\", \"password\": \"hunter2\" }, \"https://index.docker.io/v1/\": { \"username\": \"mobydock\", \"password\": \"conta1n3rize14\" } } ``` Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + - `:platform` (String.t): Platform in the format os[/arch[/variant]] + - `:target` (String.t): Target build stage + - `:outputs` (String.t): BuildKit output configuration + - `:body` (String.t): A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_build(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_build(connection, opts \\ []) do + optional_params = %{ + :dockerfile => :query, + :t => :query, + :extrahosts => :query, + :remote => :query, + :q => :query, + :nocache => :query, + :cachefrom => :query, + :pull => :query, + :rm => :query, + :forcerm => :query, + :memory => :query, + :memswap => :query, + :cpushares => :query, + :cpusetcpus => :query, + :cpuperiod => :query, + :cpuquota => :query, + :buildargs => :query, + :shmsize => :query, + :squash => :query, + :labels => :query, + :networkmode => :query, + :"Content-type" => :headers, + :"X-Registry-Config" => :headers, + :platform => :query, + :target => :query, + :outputs => :query, + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/build") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Create a new image from a container + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:container` (String.t): The ID or name of the container to commit + - `:repo` (String.t): Repository name for the created image + - `:tag` (String.t): Tag name for the create image + - `:comment` (String.t): Commit message + - `:author` (String.t): Author of the image (e.g., `John Hannibal Smith `) + - `:pause` (boolean()): Whether to pause the container before committing + - `:changes` (String.t): `Dockerfile` instructions to apply while committing + - `:body` (ContainerConfig): The container configuration + + ### Returns + + - `{:ok, DockerEngineAPI.Model.IdResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_commit(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.IdResponse.t} | {:error, Tesla.Env.t} + def image_commit(connection, opts \\ []) do + optional_params = %{ + :container => :query, + :repo => :query, + :tag => :query, + :comment => :query, + :author => :query, + :pause => :query, + :changes => :query, + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/commit") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.IdResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Create an image + Create an image by either pulling it from a registry or importing it. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:fromImage` (String.t): Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. + - `:fromSrc` (String.t): Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. + - `:repo` (String.t): Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. + - `:tag` (String.t): Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. + - `:message` (String.t): Set commit message for imported image. + - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. + - `:changes` ([String.t]): Apply `Dockerfile` instructions to the image that is created, for example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true` should be URI component encoded. Supported `Dockerfile` instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + - `:platform` (String.t): Platform in the format os[/arch[/variant]]. When used in combination with the `fromImage` option, the daemon checks if the given image is present in the local image cache with the given OS and Architecture, and otherwise attempts to pull the image. If the option is not set, the host's native OS and Architecture are used. If the given image does not exist in the local image cache, the daemon attempts to pull the image with the host's native OS and Architecture. If the given image does exists in the local image cache, but its OS or architecture does not match, a warning is produced. When used with the `fromSrc` option to import an image from an archive, this option sets the platform information for the imported image. If the option is not set, the host's native OS and Architecture are used for the imported image. + - `:body` (String.t): Image content if the value `-` has been specified in fromSrc query parameter + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_create(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_create(connection, opts \\ []) do + optional_params = %{ + :fromImage => :query, + :fromSrc => :query, + :repo => :query, + :tag => :query, + :message => :query, + :"X-Registry-Auth" => :headers, + :changes => :query, + :platform => :query, + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/images/create") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Remove an image + Remove an image, along with any untagged parent images that were referenced by that image. Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or ID + - `opts` (keyword): Optional parameters + - `:force` (boolean()): Remove the image even if it is being used by stopped containers or has other tags + - `:noprune` (boolean()): Do not delete untagged parent images + + ### Returns + + - `{:ok, [%ImageDeleteResponseItem{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, list(DockerEngineAPI.Model.ImageDeleteResponseItem.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_delete(connection, name, opts \\ []) do + optional_params = %{ + :force => :query, + :noprune => :query + } + + request = + %{} + |> method(:delete) + |> url("/images/#{name}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ImageDeleteResponseItem}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Export an image + Get a tarball containing all images and metadata for a repository. If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. ### Image tarball format An image tarball contains one directory per image layer (named using its long ID), each containing these files: - `VERSION`: currently `1.0` - the file format version - `json`: detailed layer information, similar to `docker inspect layer_id` - `layer.tar`: A tarfile containing the filesystem changes in this layer The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. ```json { \"hello-world\": { \"latest\": \"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1\" } } ``` + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or ID + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_get(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def image_get(connection, name, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/images/#{name}/get") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Export several images + Get a tarball containing all images and metadata for several image repositories. For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. For details on the format, see the [export image endpoint](#operation/ImageGet). + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:names` ([String.t]): Image names to filter by + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_get_all(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def image_get_all(connection, opts \\ []) do + optional_params = %{ + :names => :query + } + + request = + %{} + |> method(:get) + |> url("/images/get") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get the history of an image + Return parent layers of an image. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or ID + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, [%HistoryResponseItem{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_history(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.HistoryResponseItem.t)} | {:error, Tesla.Env.t} + def image_history(connection, name, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/images/#{name}/history") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.HistoryResponseItem}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect an image + Return low-level information about an image. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or id + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ImageInspect.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ImageInspect.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_inspect(connection, name, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/images/#{name}/json") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ImageInspect}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List Images + Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:all` (boolean()): Show all images. Only images from a final layer (no children) are shown by default. + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label=\"key=value\"` of an image label - `reference`=(`[:]`) - `since`=(`[:]`, `` or ``) + - `:"shared-size"` (boolean()): Compute and show shared size as a `SharedSize` field on each image. + - `:digests` (boolean()): Show digest information as a `RepoDigests` field on each image. + + ### Returns + + - `{:ok, [%ImageSummary{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.ImageSummary.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_list(connection, opts \\ []) do + optional_params = %{ + :all => :query, + :filters => :query, + :"shared-size" => :query, + :digests => :query + } + + request = + %{} + |> method(:get) + |> url("/images/json") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ImageSummary}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Import images + Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:quiet` (boolean()): Suppress progress details during load. + - `:body` (String.t): Tar archive containing images + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_load(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_load(connection, opts \\ []) do + optional_params = %{ + :quiet => :query, + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/images/load") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete unused images + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ImagePruneResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.ImagePruneResponse.t} | {:error, Tesla.Env.t} + def image_prune(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:post) + |> url("/images/prune") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ImagePruneResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Push an image + Push an image to a registry. If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. The push is cancelled if the HTTP connection is closed. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or ID. + - `x_registry_auth` (String.t): A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. + - `opts` (keyword): Optional parameters + - `:tag` (String.t): The tag to associate with the image on the registry. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_push(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_push(connection, name, x_registry_auth, opts \\ []) do + optional_params = %{ + :tag => :query + } + + request = + %{} + |> method(:post) + |> url("/images/#{name}/push") + |> add_param(:headers, :"X-Registry-Auth", x_registry_auth) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Search images + Search for an image on Docker Hub. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `term` (String.t): Term to search + - `opts` (keyword): Optional parameters + - `:limit` (integer()): Maximum number of results to return + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `is-automated=(true|false)` - `is-official=(true|false)` - `stars=` Matches images that has at least 'number' stars. + + ### Returns + + - `{:ok, [%ImageSearchResponseItem{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_search(Tesla.Env.client, String.t, keyword()) :: {:ok, list(DockerEngineAPI.Model.ImageSearchResponseItem.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_search(connection, term, opts \\ []) do + optional_params = %{ + :limit => :query, + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/images/search") + |> add_param(:query, :term, term) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ImageSearchResponseItem}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Tag an image + Tag an image so that it becomes part of a repository. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Image name or ID to tag. + - `opts` (keyword): Optional parameters + - `:repo` (String.t): The repository to tag in. For example, `someuser/someimage`. + - `:tag` (String.t): The name of the new tag. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec image_tag(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def image_tag(connection, name, opts \\ []) do + optional_params = %{ + :repo => :query, + :tag => :query + } + + request = + %{} + |> method(:post) + |> url("/images/#{name}/tag") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/network.ex b/lib/docker/impl/api/network.ex new file mode 100644 index 0000000..fa68af8 --- /dev/null +++ b/lib/docker/impl/api/network.ex @@ -0,0 +1,255 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Network do + @moduledoc """ + API calls for all endpoints tagged `Network`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Connect a container to a network + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Network ID or name + - `container` (NetworkConnectRequest): + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_connect(Tesla.Env.client, String.t, DockerEngineAPI.Model.NetworkConnectRequest.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def network_connect(connection, id, container, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/networks/#{id}/connect") + |> add_param(:body, :body, container) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {403, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Create a network + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `network_config` (NetworkCreateRequest): Network configuration + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.NetworkCreateResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_create(Tesla.Env.client, DockerEngineAPI.Model.NetworkCreateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.NetworkCreateResponse.t} | {:error, Tesla.Env.t} + def network_create(connection, network_config, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/networks/create") + |> add_param(:body, :body, network_config) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.NetworkCreateResponse}, + {403, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Remove a network + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Network ID or name + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def network_delete(connection, id, _opts \\ []) do + request = + %{} + |> method(:delete) + |> url("/networks/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {403, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Disconnect a container from a network + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Network ID or name + - `container` (NetworkDisconnectRequest): + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_disconnect(Tesla.Env.client, String.t, DockerEngineAPI.Model.NetworkDisconnectRequest.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def network_disconnect(connection, id, container, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/networks/#{id}/disconnect") + |> add_param(:body, :body, container) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {403, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a network + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): Network ID or name + - `opts` (keyword): Optional parameters + - `:verbose` (boolean()): Detailed inspect output for troubleshooting + - `:scope` (String.t): Filter the network by scope (swarm, global, or local) + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Network.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Network.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def network_inspect(connection, id, opts \\ []) do + optional_params = %{ + :verbose => :query, + :scope => :query + } + + request = + %{} + |> method(:get) + |> url("/networks/#{id}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Network}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List networks + Returns a list of networks. For details on the format, see the [network inspect endpoint](#operation/NetworkInspect). Note that it uses a different, smaller representation of a network than inspecting a single network. For example, the list of containers attached to the network is not propagated in API versions 1.28 and up. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: - `dangling=` When set to `true` (or `1`), returns all networks that are not in use by a container. When set to `false` (or `0`), only networks that are in use by one or more containers are returned. - `driver=` Matches a network's driver. - `id=` Matches all or part of a network ID. - `label=` or `label==` of a network label. - `name=` Matches all or part of a network name. - `scope=[\"swarm\"|\"global\"|\"local\"]` Filters networks by scope (`swarm`, `global`, or `local`). - `type=[\"custom\"|\"builtin\"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + + ### Returns + + - `{:ok, [%Network{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.Network.t)} | {:error, Tesla.Env.t} + def network_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/networks") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Network}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete unused networks + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.NetworkPruneResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec network_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.NetworkPruneResponse.t} | {:error, Tesla.Env.t} + def network_prune(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:post) + |> url("/networks/prune") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.NetworkPruneResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/node.ex b/lib/docker/impl/api/node.ex new file mode 100644 index 0000000..45fb04d --- /dev/null +++ b/lib/docker/impl/api/node.ex @@ -0,0 +1,159 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Node do + @moduledoc """ + API calls for all endpoints tagged `Node`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Delete a node + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): The ID or name of the node + - `opts` (keyword): Optional parameters + - `:force` (boolean()): Force remove a node from the swarm + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec node_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def node_delete(connection, id, opts \\ []) do + optional_params = %{ + :force => :query + } + + request = + %{} + |> method(:delete) + |> url("/nodes/#{id}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a node + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): The ID or name of the node + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Node.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec node_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Node.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def node_inspect(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/nodes/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Node}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List nodes + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). Available filters: - `id=` - `label=` - `membership=`(`accepted`|`pending`)` - `name=` - `node.label=` - `role=`(`manager`|`worker`)` + + ### Returns + + - `{:ok, [%Node{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec node_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Node.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def node_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/nodes") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Node}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Update a node + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): The ID of the node + - `version` (integer()): The version number of the node object being updated. This is required to avoid conflicting writes. + - `opts` (keyword): Optional parameters + - `:body` (NodeSpec): + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec node_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def node_update(connection, id, version, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/nodes/#{id}/update") + |> add_param(:query, :version, version) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/plugin.ex b/lib/docker/impl/api/plugin.ex new file mode 100644 index 0000000..7015c3d --- /dev/null +++ b/lib/docker/impl/api/plugin.ex @@ -0,0 +1,416 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Plugin do + @moduledoc """ + API calls for all endpoints tagged `Plugin`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Get plugin privileges + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `remote` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, [%PluginPrivilege{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec get_plugin_privileges(Tesla.Env.client, String.t, keyword()) :: {:ok, list(DockerEngineAPI.Model.PluginPrivilege.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def get_plugin_privileges(connection, remote, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/plugins/privileges") + |> add_param(:query, :remote, remote) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.PluginPrivilege}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Create a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + - `:body` (String.t): Path to tar containing plugin rootfs and manifest + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_create(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_create(connection, name, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/plugins/create") + |> add_param(:query, :name, name) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Remove a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + - `:force` (boolean()): Disable the plugin before removing. This may result in issues if the plugin is in use by a container. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Plugin.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Plugin.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_delete(connection, name, opts \\ []) do + optional_params = %{ + :force => :query + } + + request = + %{} + |> method(:delete) + |> url("/plugins/#{name}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Plugin}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Disable a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + - `:force` (boolean()): Force disable a plugin even if still in use. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_disable(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_disable(connection, name, opts \\ []) do + optional_params = %{ + :force => :query + } + + request = + %{} + |> method(:post) + |> url("/plugins/#{name}/disable") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Enable a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + - `:timeout` (integer()): Set the HTTP client timeout (in seconds) + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_enable(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_enable(connection, name, opts \\ []) do + optional_params = %{ + :timeout => :query + } + + request = + %{} + |> method(:post) + |> url("/plugins/#{name}/enable") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Plugin.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Plugin.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_inspect(connection, name, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/plugins/#{name}/json") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Plugin}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List plugins + Returns information about installed plugins. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters: - `capability=` - `enable=|` + + ### Returns + + - `{:ok, [%Plugin{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.Plugin.t)} | {:error, Tesla.Env.t} + def plugin_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/plugins") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Plugin}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Install a plugin + Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `remote` (String.t): Remote reference for plugin to install. The `:latest` tag is optional, and is used as the default if omitted. + - `opts` (keyword): Optional parameters + - `:name` (String.t): Local name for the pulled plugin. The `:latest` tag is optional, and is used as the default if omitted. + - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. + - `:body` ([DockerEngineAPI.Model.PluginPrivilege.t]): + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_pull(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_pull(connection, remote, opts \\ []) do + optional_params = %{ + :name => :query, + :"X-Registry-Auth" => :headers, + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/plugins/pull") + |> add_param(:query, :remote, remote) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Push a plugin + Push a plugin to the registry. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_push(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_push(connection, name, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/plugins/#{name}/push") + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Configure a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `opts` (keyword): Optional parameters + - `:body` ([String.t]): + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_set(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_set(connection, name, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/plugins/#{name}/set") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Upgrade a plugin + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + - `remote` (String.t): Remote reference to upgrade to. The `:latest` tag is optional, and is used as the default if omitted. + - `opts` (keyword): Optional parameters + - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. + - `:body` ([DockerEngineAPI.Model.PluginPrivilege.t]): + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec plugin_upgrade(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def plugin_upgrade(connection, name, remote, opts \\ []) do + optional_params = %{ + :"X-Registry-Auth" => :headers, + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/plugins/#{name}/upgrade") + |> add_param(:query, :remote, remote) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/secret.ex b/lib/docker/impl/api/secret.ex new file mode 100644 index 0000000..61da30d --- /dev/null +++ b/lib/docker/impl/api/secret.ex @@ -0,0 +1,191 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Secret do + @moduledoc """ + API calls for all endpoints tagged `Secret`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Create a secret + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:body` (SecretCreateRequest): + + ### Returns + + - `{:ok, DockerEngineAPI.Model.IdResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec secret_create(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.IdResponse.t} | {:error, Tesla.Env.t} + def secret_create(connection, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/secrets/create") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.IdResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete a secret + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID of the secret + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec secret_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def secret_delete(connection, id, _opts \\ []) do + request = + %{} + |> method(:delete) + |> url("/secrets/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a secret + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID of the secret + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Secret.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec secret_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Secret.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def secret_inspect(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/secrets/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Secret}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List secrets + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: - `id=` - `label= or label==value` - `name=` - `names=` + + ### Returns + + - `{:ok, [%Secret{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec secret_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Secret.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def secret_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/secrets") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Secret}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Update a Secret + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): The ID or name of the secret + - `version` (integer()): The version number of the secret object being updated. This is required to avoid conflicting writes. + - `opts` (keyword): Optional parameters + - `:body` (SecretSpec): The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [SecretInspect endpoint](#operation/SecretInspect) response values. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec secret_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def secret_update(connection, id, version, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/secrets/#{id}/update") + |> add_param(:query, :version, version) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/service.ex b/lib/docker/impl/api/service.ex new file mode 100644 index 0000000..e82f052 --- /dev/null +++ b/lib/docker/impl/api/service.ex @@ -0,0 +1,258 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Service do + @moduledoc """ + API calls for all endpoints tagged `Service`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Create a service + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `body` (ServiceCreateRequest): + - `opts` (keyword): Optional parameters + - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ServiceCreateResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec service_create(Tesla.Env.client, DockerEngineAPI.Model.ServiceCreateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ServiceCreateResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def service_create(connection, body, opts \\ []) do + optional_params = %{ + :"X-Registry-Auth" => :headers + } + + request = + %{} + |> method(:post) + |> url("/services/create") + |> add_param(:body, :body, body) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.ServiceCreateResponse}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {403, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete a service + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of service. + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec service_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def service_delete(connection, id, _opts \\ []) do + request = + %{} + |> method(:delete) + |> url("/services/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a service + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of service. + - `opts` (keyword): Optional parameters + - `:insertDefaults` (boolean()): Fill empty fields with default values. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Service.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec service_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Service.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def service_inspect(connection, id, opts \\ []) do + optional_params = %{ + :insertDefaults => :query + } + + request = + %{} + |> method(:get) + |> url("/services/#{id}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Service}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List services + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: - `id=` - `label=` - `mode=[\"replicated\"|\"global\"]` - `name=` + - `:status` (boolean()): Include service status, with count of running and desired tasks. + + ### Returns + + - `{:ok, [%Service{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec service_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Service.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def service_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query, + :status => :query + } + + request = + %{} + |> method(:get) + |> url("/services") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Service}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get service logs + Get `stdout` and `stderr` logs from a service. See also [`/containers/{id}/logs`](#operation/ContainerLogs). **Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of the service + - `opts` (keyword): Optional parameters + - `:details` (boolean()): Show service context and extra details provided to logs. + - `:follow` (boolean()): Keep connection after returning logs. + - `:stdout` (boolean()): Return logs from `stdout` + - `:stderr` (boolean()): Return logs from `stderr` + - `:since` (integer()): Only return logs since this time, as a UNIX timestamp + - `:timestamps` (boolean()): Add timestamps to every log line + - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec service_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def service_logs(connection, id, opts \\ []) do + optional_params = %{ + :details => :query, + :follow => :query, + :stdout => :query, + :stderr => :query, + :since => :query, + :timestamps => :query, + :tail => :query + } + + request = + %{} + |> method(:get) + |> url("/services/#{id}/logs") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Update a service + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID or name of service. + - `version` (integer()): The version number of the service object being updated. This is required to avoid conflicting writes. This version number should be the value as currently set on the service *before* the update. You can find the current version by calling `GET /services/{id}` + - `body` (ServiceUpdateRequest): + - `opts` (keyword): Optional parameters + - `:registryAuthFrom` (String.t): If the `X-Registry-Auth` header is not specified, this parameter indicates where to find registry authorization credentials. + - `:rollback` (String.t): Set to this parameter to `previous` to cause a server-side rollback to the previous service spec. The supplied spec will be ignored in this case. + - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.ServiceUpdateResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec service_update(Tesla.Env.client, String.t, integer(), DockerEngineAPI.Model.ServiceUpdateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.ServiceUpdateResponse.t} | {:error, Tesla.Env.t} + def service_update(connection, id, version, body, opts \\ []) do + optional_params = %{ + :registryAuthFrom => :query, + :rollback => :query, + :"X-Registry-Auth" => :headers + } + + request = + %{} + |> method(:post) + |> url("/services/#{id}/update") + |> add_param(:query, :version, version) + |> add_param(:body, :body, body) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.ServiceUpdateResponse}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/session.ex b/lib/docker/impl/api/session.ex new file mode 100644 index 0000000..fc1828f --- /dev/null +++ b/lib/docker/impl/api/session.ex @@ -0,0 +1,43 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Session do + @moduledoc """ + API calls for all endpoints tagged `Session`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Initialize interactive session + Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities. ### Hijacking This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection. For example, the client sends this request to upgrade the connection: ``` POST /session HTTP/1.1 Upgrade: h2c Connection: Upgrade ``` The Docker daemon responds with a `101 UPGRADED` response follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Connection: Upgrade Upgrade: h2c ``` + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec session(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def session(connection, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/session") + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {101, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/swarm.ex b/lib/docker/impl/api/swarm.ex new file mode 100644 index 0000000..7499691 --- /dev/null +++ b/lib/docker/impl/api/swarm.ex @@ -0,0 +1,252 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Swarm do + @moduledoc """ + API calls for all endpoints tagged `Swarm`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Initialize a new swarm + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `body` (SwarmInitRequest): + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_init(Tesla.Env.client, DockerEngineAPI.Model.SwarmInitRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def swarm_init(connection, body, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/swarm/init") + |> add_param(:body, :body, body) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect swarm + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Swarm.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_inspect(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.Swarm.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def swarm_inspect(connection, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/swarm") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Swarm}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Join an existing swarm + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `body` (SwarmJoinRequest): + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_join(Tesla.Env.client, DockerEngineAPI.Model.SwarmJoinRequest.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def swarm_join(connection, body, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/swarm/join") + |> add_param(:body, :body, body) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Leave a swarm + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:force` (boolean()): Force leave swarm, even if this is the last manager or that it will break the cluster. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_leave(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def swarm_leave(connection, opts \\ []) do + optional_params = %{ + :force => :query + } + + request = + %{} + |> method(:post) + |> url("/swarm/leave") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Unlock a locked manager + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `body` (SwarmUnlockRequest): + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_unlock(Tesla.Env.client, DockerEngineAPI.Model.SwarmUnlockRequest.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def swarm_unlock(connection, body, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/swarm/unlock") + |> add_param(:body, :body, body) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get the unlock key + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.UnlockKeyResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_unlockkey(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.UnlockKeyResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def swarm_unlockkey(connection, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/swarm/unlockkey") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.UnlockKeyResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Update a swarm + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `version` (integer()): The version number of the swarm object being updated. This is required to avoid conflicting writes. + - `body` (SwarmSpec): + - `opts` (keyword): Optional parameters + - `:rotateWorkerToken` (boolean()): Rotate the worker join token. + - `:rotateManagerToken` (boolean()): Rotate the manager join token. + - `:rotateManagerUnlockKey` (boolean()): Rotate the manager unlock key. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec swarm_update(Tesla.Env.client, integer(), DockerEngineAPI.Model.SwarmSpec.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def swarm_update(connection, version, body, opts \\ []) do + optional_params = %{ + :rotateWorkerToken => :query, + :rotateManagerToken => :query, + :rotateManagerUnlockKey => :query + } + + request = + %{} + |> method(:post) + |> url("/swarm/update") + |> add_param(:query, :version, version) + |> add_param(:body, :body, body) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/system.ex b/lib/docker/impl/api/system.ex new file mode 100644 index 0000000..b50eeb8 --- /dev/null +++ b/lib/docker/impl/api/system.ex @@ -0,0 +1,245 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.System do + @moduledoc """ + API calls for all endpoints tagged `System`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Check auth configuration + Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:body` (AuthConfig): Authentication to check + + ### Returns + + - `{:ok, DockerEngineAPI.Model.SystemAuthResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_auth(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.SystemAuthResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def system_auth(connection, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:post) + |> url("/auth") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.SystemAuthResponse}, + {204, false}, + {401, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get data usage information + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:type` ([String.t]): Object types, for which to compute and return data. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.SystemDataUsageResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_data_usage(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.SystemDataUsageResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def system_data_usage(connection, opts \\ []) do + optional_params = %{ + :type => :query + } + + request = + %{} + |> method(:get) + |> url("/system/df") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.SystemDataUsageResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Monitor events + Stream real-time events from the server. Various objects within Docker report events when something happens to them. Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` The Docker daemon reports these events: `reload` Services report these events: `create`, `update`, and `remove` Nodes report these events: `create`, `update`, and `remove` Secrets report these events: `create`, `update`, and `remove` Configs report these events: `create`, `update`, and `remove` The Builder reports `prune` events + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:since` (String.t): Show events created since this timestamp then stream new events. + - `:until` (String.t): Show events created until this timestamp then stop streaming. + - `:filters` (String.t): A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: - `config=` config name or ID - `container=` container name or ID - `daemon=` daemon name or ID - `event=` event type - `image=` image name or ID - `label=` image or container label - `network=` network name or ID - `node=` node ID - `plugin`= plugin name or ID - `scope`= local or swarm - `secret=` secret name or ID - `service=` service name or ID - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` - `volume=` volume name + + ### Returns + + - `{:ok, DockerEngineAPI.Model.EventMessage.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_events(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.EventMessage.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def system_events(connection, opts \\ []) do + optional_params = %{ + :since => :query, + :until => :query, + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/events") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.EventMessage}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get system information + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.SystemInfo.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_info(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.SystemInfo.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def system_info(connection, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/info") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.SystemInfo}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Ping + This is a dummy endpoint you can use to test if the server is accessible. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_ping(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def system_ping(connection, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/_ping") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Ping + This is a dummy endpoint you can use to test if the server is accessible. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_ping_head(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def system_ping_head(connection, _opts \\ []) do + request = + %{} + |> method(:head) + |> url("/_ping") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get version + Returns the version of Docker that is running and various information about the system that Docker is running on. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.SystemVersion.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec system_version(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.SystemVersion.t} | {:error, Tesla.Env.t} + def system_version(connection, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/version") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.SystemVersion}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/task.ex b/lib/docker/impl/api/task.ex new file mode 100644 index 0000000..9c0e56f --- /dev/null +++ b/lib/docker/impl/api/task.ex @@ -0,0 +1,130 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Task do + @moduledoc """ + API calls for all endpoints tagged `Task`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Inspect a task + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID of the task + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Task.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec task_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Task.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def task_inspect(connection, id, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/tasks/#{id}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Task}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List tasks + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: - `desired-state=(running | shutdown | accepted)` - `id=` - `label=key` or `label=\"key=value\"` - `name=` - `node=` - `service=` + + ### Returns + + - `{:ok, [%Task{}, ...]}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec task_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Task.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def task_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/tasks") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Task}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Get task logs + Get `stdout` and `stderr` logs from a task. See also [`/containers/{id}/logs`](#operation/ContainerLogs). **Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `id` (String.t): ID of the task + - `opts` (keyword): Optional parameters + - `:details` (boolean()): Show task context and extra details provided to logs. + - `:follow` (boolean()): Keep connection after returning logs. + - `:stdout` (boolean()): Return logs from `stdout` + - `:stderr` (boolean()): Return logs from `stderr` + - `:since` (integer()): Only return logs since this time, as a UNIX timestamp + - `:timestamps` (boolean()): Add timestamps to every log line + - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + + ### Returns + + - `{:ok, String.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec task_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + def task_logs(connection, id, opts \\ []) do + optional_params = %{ + :details => :query, + :follow => :query, + :stdout => :query, + :stderr => :query, + :since => :query, + :timestamps => :query, + :tail => :query + } + + request = + %{} + |> method(:get) + |> url("/tasks/#{id}/logs") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/api/volume.ex b/lib/docker/impl/api/volume.ex new file mode 100644 index 0000000..0e2a5bb --- /dev/null +++ b/lib/docker/impl/api/volume.ex @@ -0,0 +1,225 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Api.Volume do + @moduledoc """ + API calls for all endpoints tagged `Volume`. + """ + + alias DockerEngineAPI.Connection + import DockerEngineAPI.RequestBuilder + + @doc """ + Create a volume + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `volume_config` (VolumeCreateOptions): Volume configuration + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Volume.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec volume_create(Tesla.Env.client, DockerEngineAPI.Model.VolumeCreateOptions.t, keyword()) :: {:ok, DockerEngineAPI.Model.Volume.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def volume_create(connection, volume_config, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/volumes/create") + |> add_param(:body, :body, volume_config) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {201, DockerEngineAPI.Model.Volume}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Remove a volume + Instruct the driver to remove the volume. + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Volume name or ID + - `opts` (keyword): Optional parameters + - `:force` (boolean()): Force the removal of the volume + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec volume_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def volume_delete(connection, name, opts \\ []) do + optional_params = %{ + :force => :query + } + + request = + %{} + |> method(:delete) + |> url("/volumes/#{name}") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {204, false}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {409, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Inspect a volume + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): Volume name or ID + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, DockerEngineAPI.Model.Volume.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec volume_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Volume.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def volume_inspect(connection, name, _opts \\ []) do + request = + %{} + |> method(:get) + |> url("/volumes/#{name}") + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.Volume}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + List volumes + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - `dangling=` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned. - `driver=` Matches volumes based on their driver. - `label=` or `label=:` Matches volumes based on the presence of a `label` alone or a `label` and a value. - `name=` Matches all or part of a volume name. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.VolumeListResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec volume_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.VolumeListResponse.t} | {:error, Tesla.Env.t} + def volume_list(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:get) + |> url("/volumes") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.VolumeListResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + Delete unused volumes + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `opts` (keyword): Optional parameters + - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. + + ### Returns + + - `{:ok, DockerEngineAPI.Model.VolumePruneResponse.t}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec volume_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.VolumePruneResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def volume_prune(connection, opts \\ []) do + optional_params = %{ + :filters => :query + } + + request = + %{} + |> method(:post) + |> url("/volumes/prune") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, DockerEngineAPI.Model.VolumePruneResponse}, + {500, DockerEngineAPI.Model.ErrorResponse} + ]) + end + + @doc """ + \"Update a volume. Valid only for Swarm cluster volumes\" + + ### Parameters + + - `connection` (DockerEngineAPI.Connection): Connection to server + - `name` (String.t): The name or ID of the volume + - `version` (integer()): The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume's `ClusterVolume` field. + - `opts` (keyword): Optional parameters + - `:body` (VolumeUpdateRequest): The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged. + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec volume_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + def volume_update(connection, name, version, opts \\ []) do + optional_params = %{ + :body => :body + } + + request = + %{} + |> method(:put) + |> url("/volumes/#{name}") + |> add_param(:query, :version, version) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false}, + {400, DockerEngineAPI.Model.ErrorResponse}, + {404, DockerEngineAPI.Model.ErrorResponse}, + {500, DockerEngineAPI.Model.ErrorResponse}, + {503, DockerEngineAPI.Model.ErrorResponse} + ]) + end +end diff --git a/lib/docker/impl/connection.ex b/lib/docker/impl/connection.ex new file mode 100644 index 0000000..f88e033 --- /dev/null +++ b/lib/docker/impl/connection.ex @@ -0,0 +1,99 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Connection do + @moduledoc """ + Handle Tesla connections for DockerEngineAPI. + """ + + @default_options [ + base_url: "http://localhost/v1.43", + adapter: Tesla.Adapter.Hackney + ] + + @typedoc """ + The list of options that can be passed to new/1. + + - `base_url`: Overrides the base URL on a per-client basis. + - `user_agent`: Overrides the User-Agent header. + """ + @type options :: [ + {:base_url, String.t()}, + {:user_agent, String.t()} + ] + + @doc "Forward requests to Tesla." + @spec request(Tesla.Client.t(), [Tesla.option()]) :: Tesla.Env.result() + defdelegate request(client, options), to: Tesla + + @doc """ + Configure a client that may have authentication. + + ### Parameters + + - `options`: a keyword list of OpenAPIPetstore.Connection.options. + + ### Returns + + Tesla.Env.client + """ + @spec new(options) :: Tesla.Env.client() + + def new(options \\ []) when is_list(options) do + options = @default_options |> Keyword.merge(options) + + options + |> Keyword.merge(options) + |> middleware() + |> Tesla.client(adapter(options)) + end + + @doc """ + Returns fully configured middleware for passing to Tesla.client/2. + """ + @spec middleware(options) :: [Tesla.Client.middleware()] + def middleware(options \\ []) do + base_url = Keyword.get(options, :base_url) + + tesla_options = get_tesla_options() + middleware = Keyword.get(tesla_options, :middleware, []) + json_engine = Keyword.get(tesla_options, :json, Jason) + + user_agent = + Keyword.get( + options, + :user_agent, + Keyword.get( + tesla_options, + :user_agent, + "openapi-generator - DockerEngineAPI 1.43 - elixir" + ) + ) + + [ + {Tesla.Middleware.BaseUrl, base_url}, + {Tesla.Middleware.Headers, [{"user-agent", user_agent}]}, + {Tesla.Middleware.EncodeJson, engine: json_engine} + | middleware + ] + end + + def get_tesla_options, do: Application.get_env(:tesla, __MODULE__, []) + + @doc """ + Returns the default adapter for this API. + """ + def adapter(options \\ []) do + case Keyword.get( + options, + :adapter, + Keyword.get(get_tesla_options(), :adapter, nil) + ) do + Tesla.Adapter.Hackney -> + {Tesla.Adapter.Hackney, [recv_timeout: Keyword.get(options, :recv_timeout, 1_000)]} + + other -> + other + end + end +end diff --git a/lib/docker/impl/deserializer.ex b/lib/docker/impl/deserializer.ex new file mode 100644 index 0000000..f134636 --- /dev/null +++ b/lib/docker/impl/deserializer.ex @@ -0,0 +1,114 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Deserializer do + @moduledoc """ + Helper functions for deserializing responses into models + """ + + @jason_decode_opts [keys: :strings] + + def jason_decode(json) do + Jason.decode(json, @jason_decode_opts) + end + + def jason_decode(json, module) do + json + |> jason_decode() + |> case do + {:ok, decoded} -> {:ok, to_struct(decoded, module)} + {:error, _} = error -> error + end + end + + @doc """ + Update the provided model with a deserialization of a nested value + """ + @spec deserialize(struct(), atom(), :date | :datetime | :list | :map | :struct, module()) :: + struct() + def deserialize(model, field, :list, module) do + model + |> Map.update!(field, fn + nil -> + nil + + list -> + Enum.map(list, &to_struct(&1, module)) + end) + end + + def deserialize(model, field, :struct, module) do + model + |> Map.update!(field, fn + nil -> + nil + + value -> + to_struct(value, module) + end) + end + + def deserialize(model, field, :map, module) do + maybe_transform_map = fn + nil -> + nil + + existing_value -> + Map.new(existing_value, fn + {key, value} -> + {key, to_struct(value, module)} + end) + end + + Map.update!(model, field, maybe_transform_map) + end + + def deserialize(model, field, :date, _) do + value = Map.get(model, field) + + case is_binary(value) do + true -> + case Date.from_iso8601(value) do + {:ok, date} -> Map.put(model, field, date) + _ -> model + end + + false -> + model + end + end + + def deserialize(model, field, :datetime, _) do + value = Map.get(model, field) + + case is_binary(value) do + true -> + case DateTime.from_iso8601(value) do + {:ok, datetime, _offset} -> Map.put(model, field, datetime) + _ -> model + end + + false -> + model + end + end + + defp to_struct(map_or_list, module) + defp to_struct(nil, _), do: nil + + defp to_struct(list, module) when is_list(list) and is_atom(module) do + Enum.map(list, &to_struct(&1, module)) + end + + defp to_struct(map, module) when is_map(map) and is_atom(module) do + model = struct(module) + + model + |> Map.keys() + |> List.delete(:__struct__) + |> Enum.reduce(model, fn field, acc -> + Map.replace(acc, field, Map.get(map, Atom.to_string(field))) + end) + |> module.decode() + end +end diff --git a/lib/docker/impl/model/address.ex b/lib/docker/impl/model/address.ex new file mode 100644 index 0000000..3ac2b56 --- /dev/null +++ b/lib/docker/impl/model/address.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Address do + @moduledoc """ + Address represents an IPv4 or IPv6 IP address. + """ + + @derive Jason.Encoder + defstruct [ + :Addr, + :PrefixLen + ] + + @type t :: %__MODULE__{ + :Addr => String.t | nil, + :PrefixLen => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/auth_config.ex b/lib/docker/impl/model/auth_config.ex new file mode 100644 index 0000000..d58145e --- /dev/null +++ b/lib/docker/impl/model/auth_config.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.AuthConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :username, + :password, + :email, + :serveraddress + ] + + @type t :: %__MODULE__{ + :username => String.t | nil, + :password => String.t | nil, + :email => String.t | nil, + :serveraddress => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/build_cache.ex b/lib/docker/impl/model/build_cache.ex new file mode 100644 index 0000000..d421abd --- /dev/null +++ b/lib/docker/impl/model/build_cache.ex @@ -0,0 +1,42 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.BuildCache do + @moduledoc """ + BuildCache contains information about a build cache record. + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Parent, + :Parents, + :Type, + :Description, + :InUse, + :Shared, + :Size, + :CreatedAt, + :LastUsedAt, + :UsageCount + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Parent => String.t | nil, + :Parents => [String.t] | nil, + :Type => String.t | nil, + :Description => String.t | nil, + :InUse => boolean() | nil, + :Shared => boolean() | nil, + :Size => integer() | nil, + :CreatedAt => String.t | nil, + :LastUsedAt => String.t | nil, + :UsageCount => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/build_info.ex b/lib/docker/impl/model/build_info.ex new file mode 100644 index 0000000..88b77c8 --- /dev/null +++ b/lib/docker/impl/model/build_info.ex @@ -0,0 +1,41 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.BuildInfo do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :id, + :stream, + :error, + :errorDetail, + :status, + :progress, + :progressDetail, + :aux + ] + + @type t :: %__MODULE__{ + :id => String.t | nil, + :stream => String.t | nil, + :error => String.t | nil, + :errorDetail => DockerEngineAPI.Model.ErrorDetail.t | nil, + :status => String.t | nil, + :progress => String.t | nil, + :progressDetail => DockerEngineAPI.Model.ProgressDetail.t | nil, + :aux => DockerEngineAPI.Model.ImageId.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:errorDetail, :struct, DockerEngineAPI.Model.ErrorDetail) + |> Deserializer.deserialize(:progressDetail, :struct, DockerEngineAPI.Model.ProgressDetail) + |> Deserializer.deserialize(:aux, :struct, DockerEngineAPI.Model.ImageId) + end +end + diff --git a/lib/docker/impl/model/build_prune_response.ex b/lib/docker/impl/model/build_prune_response.ex new file mode 100644 index 0000000..a02128a --- /dev/null +++ b/lib/docker/impl/model/build_prune_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.BuildPruneResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :CachesDeleted, + :SpaceReclaimed + ] + + @type t :: %__MODULE__{ + :CachesDeleted => [String.t] | nil, + :SpaceReclaimed => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/change_type.ex b/lib/docker/impl/model/change_type.ex new file mode 100644 index 0000000..f53633c --- /dev/null +++ b/lib/docker/impl/model/change_type.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ChangeType do + @moduledoc """ + Kind of change Can be one of: - `0`: Modified (\"C\") - `1`: Added (\"A\") - `2`: Deleted (\"D\") + """ + + @derive Jason.Encoder + defstruct [ + + ] + + @type t :: %__MODULE__{ + + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/cluster_info.ex b/lib/docker/impl/model/cluster_info.ex new file mode 100644 index 0000000..c10f112 --- /dev/null +++ b/lib/docker/impl/model/cluster_info.ex @@ -0,0 +1,45 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterInfo do + @moduledoc """ + ClusterInfo represents information about the swarm as is returned by the \"/info\" endpoint. Join-tokens are not included. + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec, + :TLSInfo, + :RootRotationInProgress, + :DataPathPort, + :DefaultAddrPool, + :SubnetSize + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.SwarmSpec.t | nil, + :TLSInfo => DockerEngineAPI.Model.TlsInfo.t | nil, + :RootRotationInProgress => boolean() | nil, + :DataPathPort => integer() | nil, + :DefaultAddrPool => [String.t] | nil, + :SubnetSize => integer() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SwarmSpec) + |> Deserializer.deserialize(:TLSInfo, :struct, DockerEngineAPI.Model.TlsInfo) + end +end + diff --git a/lib/docker/impl/model/cluster_volume.ex b/lib/docker/impl/model/cluster_volume.ex new file mode 100644 index 0000000..d1a241a --- /dev/null +++ b/lib/docker/impl/model/cluster_volume.ex @@ -0,0 +1,40 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolume do + @moduledoc """ + Options and information specific to, and only present on, Swarm CSI cluster volumes. + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec, + :Info, + :PublishStatus + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.ClusterVolumeSpec.t | nil, + :Info => DockerEngineAPI.Model.ClusterVolumeInfo.t | nil, + :PublishStatus => [DockerEngineAPI.Model.ClusterVolumePublishStatusInner.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ClusterVolumeSpec) + |> Deserializer.deserialize(:Info, :struct, DockerEngineAPI.Model.ClusterVolumeInfo) + |> Deserializer.deserialize(:PublishStatus, :list, DockerEngineAPI.Model.ClusterVolumePublishStatusInner) + end +end + diff --git a/lib/docker/impl/model/cluster_volume_info.ex b/lib/docker/impl/model/cluster_volume_info.ex new file mode 100644 index 0000000..f8f1837 --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_info.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumeInfo do + @moduledoc """ + Information about the global status of the volume. + """ + + @derive Jason.Encoder + defstruct [ + :CapacityBytes, + :VolumeContext, + :VolumeID, + :AccessibleTopology + ] + + @type t :: %__MODULE__{ + :CapacityBytes => integer() | nil, + :VolumeContext => %{optional(String.t) => String.t} | nil, + :VolumeID => String.t | nil, + :AccessibleTopology => [DockerEngineAPI.Model.Map.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/cluster_volume_publish_status_inner.ex b/lib/docker/impl/model/cluster_volume_publish_status_inner.ex new file mode 100644 index 0000000..bc64140 --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_publish_status_inner.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumePublishStatusInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :NodeID, + :State, + :PublishContext + ] + + @type t :: %__MODULE__{ + :NodeID => String.t | nil, + :State => String.t | nil, + :PublishContext => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/cluster_volume_spec.ex b/lib/docker/impl/model/cluster_volume_spec.ex new file mode 100644 index 0000000..d5bc67d --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_spec.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumeSpec do + @moduledoc """ + Cluster-specific options used to create the volume. + """ + + @derive Jason.Encoder + defstruct [ + :Group, + :AccessMode + ] + + @type t :: %__MODULE__{ + :Group => String.t | nil, + :AccessMode => DockerEngineAPI.Model.ClusterVolumeSpecAccessMode.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:AccessMode, :struct, DockerEngineAPI.Model.ClusterVolumeSpecAccessMode) + end +end + diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode.ex b/lib/docker/impl/model/cluster_volume_spec_access_mode.ex new file mode 100644 index 0000000..e9d14b0 --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_spec_access_mode.ex @@ -0,0 +1,39 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessMode do + @moduledoc """ + Defines how the volume is used by tasks. + """ + + @derive Jason.Encoder + defstruct [ + :Scope, + :Sharing, + :MountVolume, + :Secrets, + :AccessibilityRequirements, + :CapacityRange, + :Availability + ] + + @type t :: %__MODULE__{ + :Scope => String.t | nil, + :Sharing => String.t | nil, + :MountVolume => map() | nil, + :Secrets => [DockerEngineAPI.Model.ClusterVolumeSpecAccessModeSecretsInner.t] | nil, + :AccessibilityRequirements => DockerEngineAPI.Model.ClusterVolumeSpecAccessModeAccessibilityRequirements.t | nil, + :CapacityRange => DockerEngineAPI.Model.ClusterVolumeSpecAccessModeCapacityRange.t | nil, + :Availability => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Secrets, :list, DockerEngineAPI.Model.ClusterVolumeSpecAccessModeSecretsInner) + |> Deserializer.deserialize(:AccessibilityRequirements, :struct, DockerEngineAPI.Model.ClusterVolumeSpecAccessModeAccessibilityRequirements) + |> Deserializer.deserialize(:CapacityRange, :struct, DockerEngineAPI.Model.ClusterVolumeSpecAccessModeCapacityRange) + end +end + diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode_accessibility_requirements.ex b/lib/docker/impl/model/cluster_volume_spec_access_mode_accessibility_requirements.ex new file mode 100644 index 0000000..defd7d5 --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_spec_access_mode_accessibility_requirements.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessModeAccessibilityRequirements do + @moduledoc """ + Requirements for the accessible topology of the volume. These fields are optional. For an in-depth description of what these fields mean, see the CSI specification. + """ + + @derive Jason.Encoder + defstruct [ + :Requisite, + :Preferred + ] + + @type t :: %__MODULE__{ + :Requisite => [DockerEngineAPI.Model.Map.t] | nil, + :Preferred => [DockerEngineAPI.Model.Map.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode_capacity_range.ex b/lib/docker/impl/model/cluster_volume_spec_access_mode_capacity_range.ex new file mode 100644 index 0000000..38726b1 --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_spec_access_mode_capacity_range.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessModeCapacityRange do + @moduledoc """ + The desired capacity that the volume should be created with. If empty, the plugin will decide the capacity. + """ + + @derive Jason.Encoder + defstruct [ + :RequiredBytes, + :LimitBytes + ] + + @type t :: %__MODULE__{ + :RequiredBytes => integer() | nil, + :LimitBytes => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode_secrets_inner.ex b/lib/docker/impl/model/cluster_volume_spec_access_mode_secrets_inner.ex new file mode 100644 index 0000000..74cf506 --- /dev/null +++ b/lib/docker/impl/model/cluster_volume_spec_access_mode_secrets_inner.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessModeSecretsInner do + @moduledoc """ + One cluster volume secret entry. Defines a key-value pair that is passed to the plugin. + """ + + @derive Jason.Encoder + defstruct [ + :Key, + :Secret + ] + + @type t :: %__MODULE__{ + :Key => String.t | nil, + :Secret => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/commit.ex b/lib/docker/impl/model/commit.ex new file mode 100644 index 0000000..4ec6073 --- /dev/null +++ b/lib/docker/impl/model/commit.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Commit do + @moduledoc """ + Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`. + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Expected + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Expected => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/config.ex b/lib/docker/impl/model/config.ex new file mode 100644 index 0000000..732cdfd --- /dev/null +++ b/lib/docker/impl/model/config.ex @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Config do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.ConfigSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ConfigSpec) + end +end + diff --git a/lib/docker/impl/model/config_create_request.ex b/lib/docker/impl/model/config_create_request.ex new file mode 100644 index 0000000..fd205bd --- /dev/null +++ b/lib/docker/impl/model/config_create_request.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ConfigCreateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :Data, + :Templating + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Data => String.t | nil, + :Templating => DockerEngineAPI.Model.Driver.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) + end +end + diff --git a/lib/docker/impl/model/config_spec.ex b/lib/docker/impl/model/config_spec.ex new file mode 100644 index 0000000..7340261 --- /dev/null +++ b/lib/docker/impl/model/config_spec.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ConfigSpec do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :Data, + :Templating + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Data => String.t | nil, + :Templating => DockerEngineAPI.Model.Driver.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) + end +end + diff --git a/lib/docker/impl/model/container_config.ex b/lib/docker/impl/model/container_config.ex new file mode 100644 index 0000000..52a89b0 --- /dev/null +++ b/lib/docker/impl/model/container_config.ex @@ -0,0 +1,73 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerConfig do + @moduledoc """ + Configuration for a container that is portable between hosts. When used as `ContainerConfig` field in an image, `ContainerConfig` is an optional field containing the configuration of the container that was last committed when creating the image. Previous versions of Docker builder used this field to store build cache, and it is not in active use anymore. + """ + + @derive Jason.Encoder + defstruct [ + :Hostname, + :Domainname, + :User, + :AttachStdin, + :AttachStdout, + :AttachStderr, + :ExposedPorts, + :Tty, + :OpenStdin, + :StdinOnce, + :Env, + :Cmd, + :Healthcheck, + :ArgsEscaped, + :Image, + :Volumes, + :WorkingDir, + :Entrypoint, + :NetworkDisabled, + :MacAddress, + :OnBuild, + :Labels, + :StopSignal, + :StopTimeout, + :Shell + ] + + @type t :: %__MODULE__{ + :Hostname => String.t | nil, + :Domainname => String.t | nil, + :User => String.t | nil, + :AttachStdin => boolean() | nil, + :AttachStdout => boolean() | nil, + :AttachStderr => boolean() | nil, + :ExposedPorts => %{optional(String.t) => map()} | nil, + :Tty => boolean() | nil, + :OpenStdin => boolean() | nil, + :StdinOnce => boolean() | nil, + :Env => [String.t] | nil, + :Cmd => [String.t] | nil, + :Healthcheck => DockerEngineAPI.Model.HealthConfig.t | nil, + :ArgsEscaped => boolean() | nil, + :Image => String.t | nil, + :Volumes => %{optional(String.t) => map()} | nil, + :WorkingDir => String.t | nil, + :Entrypoint => [String.t] | nil, + :NetworkDisabled => boolean() | nil, + :MacAddress => String.t | nil, + :OnBuild => [String.t] | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :StopSignal => String.t | nil, + :StopTimeout => integer() | nil, + :Shell => [String.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Healthcheck, :struct, DockerEngineAPI.Model.HealthConfig) + end +end + diff --git a/lib/docker/impl/model/container_create_request.ex b/lib/docker/impl/model/container_create_request.ex new file mode 100644 index 0000000..ff5d771 --- /dev/null +++ b/lib/docker/impl/model/container_create_request.ex @@ -0,0 +1,79 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerCreateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Hostname, + :Domainname, + :User, + :AttachStdin, + :AttachStdout, + :AttachStderr, + :ExposedPorts, + :Tty, + :OpenStdin, + :StdinOnce, + :Env, + :Cmd, + :Healthcheck, + :ArgsEscaped, + :Image, + :Volumes, + :WorkingDir, + :Entrypoint, + :NetworkDisabled, + :MacAddress, + :OnBuild, + :Labels, + :StopSignal, + :StopTimeout, + :Shell, + :HostConfig, + :NetworkingConfig + ] + + @type t :: %__MODULE__{ + :Hostname => String.t | nil, + :Domainname => String.t | nil, + :User => String.t | nil, + :AttachStdin => boolean() | nil, + :AttachStdout => boolean() | nil, + :AttachStderr => boolean() | nil, + :ExposedPorts => %{optional(String.t) => map()} | nil, + :Tty => boolean() | nil, + :OpenStdin => boolean() | nil, + :StdinOnce => boolean() | nil, + :Env => [String.t] | nil, + :Cmd => [String.t] | nil, + :Healthcheck => DockerEngineAPI.Model.HealthConfig.t | nil, + :ArgsEscaped => boolean() | nil, + :Image => String.t | nil, + :Volumes => %{optional(String.t) => map()} | nil, + :WorkingDir => String.t | nil, + :Entrypoint => [String.t] | nil, + :NetworkDisabled => boolean() | nil, + :MacAddress => String.t | nil, + :OnBuild => [String.t] | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :StopSignal => String.t | nil, + :StopTimeout => integer() | nil, + :Shell => [String.t] | nil, + :HostConfig => DockerEngineAPI.Model.HostConfig.t | nil, + :NetworkingConfig => DockerEngineAPI.Model.NetworkingConfig.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Healthcheck, :struct, DockerEngineAPI.Model.HealthConfig) + |> Deserializer.deserialize(:HostConfig, :struct, DockerEngineAPI.Model.HostConfig) + |> Deserializer.deserialize(:NetworkingConfig, :struct, DockerEngineAPI.Model.NetworkingConfig) + end +end + diff --git a/lib/docker/impl/model/container_create_response.ex b/lib/docker/impl/model/container_create_response.ex new file mode 100644 index 0000000..d60979a --- /dev/null +++ b/lib/docker/impl/model/container_create_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerCreateResponse do + @moduledoc """ + OK response to ContainerCreate operation + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :Warnings + ] + + @type t :: %__MODULE__{ + :Id => String.t, + :Warnings => [String.t] + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/container_inspect_response.ex b/lib/docker/impl/model/container_inspect_response.ex new file mode 100644 index 0000000..2c2f9b1 --- /dev/null +++ b/lib/docker/impl/model/container_inspect_response.ex @@ -0,0 +1,78 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerInspectResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :Created, + :Path, + :Args, + :State, + :Image, + :ResolvConfPath, + :HostnamePath, + :HostsPath, + :LogPath, + :Name, + :RestartCount, + :Driver, + :Platform, + :MountLabel, + :ProcessLabel, + :AppArmorProfile, + :ExecIDs, + :HostConfig, + :GraphDriver, + :SizeRw, + :SizeRootFs, + :Mounts, + :Config, + :NetworkSettings + ] + + @type t :: %__MODULE__{ + :Id => String.t | nil, + :Created => String.t | nil, + :Path => String.t | nil, + :Args => [String.t] | nil, + :State => DockerEngineAPI.Model.ContainerState.t | nil, + :Image => String.t | nil, + :ResolvConfPath => String.t | nil, + :HostnamePath => String.t | nil, + :HostsPath => String.t | nil, + :LogPath => String.t | nil, + :Name => String.t | nil, + :RestartCount => integer() | nil, + :Driver => String.t | nil, + :Platform => String.t | nil, + :MountLabel => String.t | nil, + :ProcessLabel => String.t | nil, + :AppArmorProfile => String.t | nil, + :ExecIDs => [String.t] | nil, + :HostConfig => DockerEngineAPI.Model.HostConfig.t | nil, + :GraphDriver => DockerEngineAPI.Model.GraphDriverData.t | nil, + :SizeRw => integer() | nil, + :SizeRootFs => integer() | nil, + :Mounts => [DockerEngineAPI.Model.MountPoint.t] | nil, + :Config => DockerEngineAPI.Model.ContainerConfig.t | nil, + :NetworkSettings => DockerEngineAPI.Model.NetworkSettings.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:State, :struct, DockerEngineAPI.Model.ContainerState) + |> Deserializer.deserialize(:HostConfig, :struct, DockerEngineAPI.Model.HostConfig) + |> Deserializer.deserialize(:GraphDriver, :struct, DockerEngineAPI.Model.GraphDriverData) + |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.MountPoint) + |> Deserializer.deserialize(:Config, :struct, DockerEngineAPI.Model.ContainerConfig) + |> Deserializer.deserialize(:NetworkSettings, :struct, DockerEngineAPI.Model.NetworkSettings) + end +end + diff --git a/lib/docker/impl/model/container_prune_response.ex b/lib/docker/impl/model/container_prune_response.ex new file mode 100644 index 0000000..7e2c5b1 --- /dev/null +++ b/lib/docker/impl/model/container_prune_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerPruneResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ContainersDeleted, + :SpaceReclaimed + ] + + @type t :: %__MODULE__{ + :ContainersDeleted => [String.t] | nil, + :SpaceReclaimed => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/container_state.ex b/lib/docker/impl/model/container_state.ex new file mode 100644 index 0000000..f44189c --- /dev/null +++ b/lib/docker/impl/model/container_state.ex @@ -0,0 +1,47 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerState do + @moduledoc """ + ContainerState stores container's running state. It's part of ContainerJSONBase and will be returned by the \"inspect\" command. + """ + + @derive Jason.Encoder + defstruct [ + :Status, + :Running, + :Paused, + :Restarting, + :OOMKilled, + :Dead, + :Pid, + :ExitCode, + :Error, + :StartedAt, + :FinishedAt, + :Health + ] + + @type t :: %__MODULE__{ + :Status => String.t | nil, + :Running => boolean() | nil, + :Paused => boolean() | nil, + :Restarting => boolean() | nil, + :OOMKilled => boolean() | nil, + :Dead => boolean() | nil, + :Pid => integer() | nil, + :ExitCode => integer() | nil, + :Error => String.t | nil, + :StartedAt => String.t | nil, + :FinishedAt => String.t | nil, + :Health => DockerEngineAPI.Model.Health.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Health, :struct, DockerEngineAPI.Model.Health) + end +end + diff --git a/lib/docker/impl/model/container_summary.ex b/lib/docker/impl/model/container_summary.ex new file mode 100644 index 0000000..9f12da8 --- /dev/null +++ b/lib/docker/impl/model/container_summary.ex @@ -0,0 +1,56 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerSummary do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :Names, + :Image, + :ImageID, + :Command, + :Created, + :Ports, + :SizeRw, + :SizeRootFs, + :Labels, + :State, + :Status, + :HostConfig, + :NetworkSettings, + :Mounts + ] + + @type t :: %__MODULE__{ + :Id => String.t | nil, + :Names => [String.t] | nil, + :Image => String.t | nil, + :ImageID => String.t | nil, + :Command => String.t | nil, + :Created => integer() | nil, + :Ports => [DockerEngineAPI.Model.Port.t] | nil, + :SizeRw => integer() | nil, + :SizeRootFs => integer() | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :State => String.t | nil, + :Status => String.t | nil, + :HostConfig => DockerEngineAPI.Model.ContainerSummaryHostConfig.t | nil, + :NetworkSettings => DockerEngineAPI.Model.ContainerSummaryNetworkSettings.t | nil, + :Mounts => [DockerEngineAPI.Model.MountPoint.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Ports, :list, DockerEngineAPI.Model.Port) + |> Deserializer.deserialize(:HostConfig, :struct, DockerEngineAPI.Model.ContainerSummaryHostConfig) + |> Deserializer.deserialize(:NetworkSettings, :struct, DockerEngineAPI.Model.ContainerSummaryNetworkSettings) + |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.MountPoint) + end +end + diff --git a/lib/docker/impl/model/container_summary_host_config.ex b/lib/docker/impl/model/container_summary_host_config.ex new file mode 100644 index 0000000..244cd97 --- /dev/null +++ b/lib/docker/impl/model/container_summary_host_config.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerSummaryHostConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :NetworkMode + ] + + @type t :: %__MODULE__{ + :NetworkMode => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/container_summary_network_settings.ex b/lib/docker/impl/model/container_summary_network_settings.ex new file mode 100644 index 0000000..295aaf5 --- /dev/null +++ b/lib/docker/impl/model/container_summary_network_settings.ex @@ -0,0 +1,25 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerSummaryNetworkSettings do + @moduledoc """ + A summary of the container's network settings + """ + + @derive Jason.Encoder + defstruct [ + :Networks + ] + + @type t :: %__MODULE__{ + :Networks => %{optional(String.t) => DockerEngineAPI.Model.EndpointSettings.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Networks, :map, DockerEngineAPI.Model.EndpointSettings) + end +end + diff --git a/lib/docker/impl/model/container_top_response.ex b/lib/docker/impl/model/container_top_response.ex new file mode 100644 index 0000000..437798f --- /dev/null +++ b/lib/docker/impl/model/container_top_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerTopResponse do + @moduledoc """ + OK response to ContainerTop operation + """ + + @derive Jason.Encoder + defstruct [ + :Titles, + :Processes + ] + + @type t :: %__MODULE__{ + :Titles => [String.t] | nil, + :Processes => [[String.t]] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/container_update_request.ex b/lib/docker/impl/model/container_update_request.ex new file mode 100644 index 0000000..d733054 --- /dev/null +++ b/lib/docker/impl/model/container_update_request.ex @@ -0,0 +1,95 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerUpdateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :CpuShares, + :Memory, + :CgroupParent, + :BlkioWeight, + :BlkioWeightDevice, + :BlkioDeviceReadBps, + :BlkioDeviceWriteBps, + :BlkioDeviceReadIOps, + :BlkioDeviceWriteIOps, + :CpuPeriod, + :CpuQuota, + :CpuRealtimePeriod, + :CpuRealtimeRuntime, + :CpusetCpus, + :CpusetMems, + :Devices, + :DeviceCgroupRules, + :DeviceRequests, + :KernelMemoryTCP, + :MemoryReservation, + :MemorySwap, + :MemorySwappiness, + :NanoCpus, + :OomKillDisable, + :Init, + :PidsLimit, + :Ulimits, + :CpuCount, + :CpuPercent, + :IOMaximumIOps, + :IOMaximumBandwidth, + :RestartPolicy + ] + + @type t :: %__MODULE__{ + :CpuShares => integer() | nil, + :Memory => integer() | nil, + :CgroupParent => String.t | nil, + :BlkioWeight => integer() | nil, + :BlkioWeightDevice => [DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner.t] | nil, + :BlkioDeviceReadBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceWriteBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceReadIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceWriteIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :CpuPeriod => integer() | nil, + :CpuQuota => integer() | nil, + :CpuRealtimePeriod => integer() | nil, + :CpuRealtimeRuntime => integer() | nil, + :CpusetCpus => String.t | nil, + :CpusetMems => String.t | nil, + :Devices => [DockerEngineAPI.Model.DeviceMapping.t] | nil, + :DeviceCgroupRules => [String.t] | nil, + :DeviceRequests => [DockerEngineAPI.Model.DeviceRequest.t] | nil, + :KernelMemoryTCP => integer() | nil, + :MemoryReservation => integer() | nil, + :MemorySwap => integer() | nil, + :MemorySwappiness => integer() | nil, + :NanoCpus => integer() | nil, + :OomKillDisable => boolean() | nil, + :Init => boolean() | nil, + :PidsLimit => integer() | nil, + :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil, + :CpuCount => integer() | nil, + :CpuPercent => integer() | nil, + :IOMaximumIOps => integer() | nil, + :IOMaximumBandwidth => integer() | nil, + :RestartPolicy => DockerEngineAPI.Model.RestartPolicy.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:BlkioWeightDevice, :list, DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner) + |> Deserializer.deserialize(:BlkioDeviceReadBps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceWriteBps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceReadIOps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceWriteIOps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.DeviceMapping) + |> Deserializer.deserialize(:DeviceRequests, :list, DockerEngineAPI.Model.DeviceRequest) + |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner) + |> Deserializer.deserialize(:RestartPolicy, :struct, DockerEngineAPI.Model.RestartPolicy) + end +end + diff --git a/lib/docker/impl/model/container_update_response.ex b/lib/docker/impl/model/container_update_response.ex new file mode 100644 index 0000000..49ac617 --- /dev/null +++ b/lib/docker/impl/model/container_update_response.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerUpdateResponse do + @moduledoc """ + OK response to ContainerUpdate operation + """ + + @derive Jason.Encoder + defstruct [ + :Warnings + ] + + @type t :: %__MODULE__{ + :Warnings => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/container_wait_exit_error.ex b/lib/docker/impl/model/container_wait_exit_error.ex new file mode 100644 index 0000000..3bfa9f3 --- /dev/null +++ b/lib/docker/impl/model/container_wait_exit_error.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerWaitExitError do + @moduledoc """ + container waiting error, if any + """ + + @derive Jason.Encoder + defstruct [ + :Message + ] + + @type t :: %__MODULE__{ + :Message => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/container_wait_response.ex b/lib/docker/impl/model/container_wait_response.ex new file mode 100644 index 0000000..c200dda --- /dev/null +++ b/lib/docker/impl/model/container_wait_response.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ContainerWaitResponse do + @moduledoc """ + OK response to ContainerWait operation + """ + + @derive Jason.Encoder + defstruct [ + :StatusCode, + :Error + ] + + @type t :: %__MODULE__{ + :StatusCode => integer(), + :Error => DockerEngineAPI.Model.ContainerWaitExitError.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Error, :struct, DockerEngineAPI.Model.ContainerWaitExitError) + end +end + diff --git a/lib/docker/impl/model/create_image_info.ex b/lib/docker/impl/model/create_image_info.ex new file mode 100644 index 0000000..f1fa42c --- /dev/null +++ b/lib/docker/impl/model/create_image_info.ex @@ -0,0 +1,36 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.CreateImageInfo do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :id, + :error, + :errorDetail, + :status, + :progress, + :progressDetail + ] + + @type t :: %__MODULE__{ + :id => String.t | nil, + :error => String.t | nil, + :errorDetail => DockerEngineAPI.Model.ErrorDetail.t | nil, + :status => String.t | nil, + :progress => String.t | nil, + :progressDetail => DockerEngineAPI.Model.ProgressDetail.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:errorDetail, :struct, DockerEngineAPI.Model.ErrorDetail) + |> Deserializer.deserialize(:progressDetail, :struct, DockerEngineAPI.Model.ProgressDetail) + end +end + diff --git a/lib/docker/impl/model/device_mapping.ex b/lib/docker/impl/model/device_mapping.ex new file mode 100644 index 0000000..d570b0a --- /dev/null +++ b/lib/docker/impl/model/device_mapping.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.DeviceMapping do + @moduledoc """ + A device mapping between the host and container + """ + + @derive Jason.Encoder + defstruct [ + :PathOnHost, + :PathInContainer, + :CgroupPermissions + ] + + @type t :: %__MODULE__{ + :PathOnHost => String.t | nil, + :PathInContainer => String.t | nil, + :CgroupPermissions => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/device_request.ex b/lib/docker/impl/model/device_request.ex new file mode 100644 index 0000000..1a9ba8c --- /dev/null +++ b/lib/docker/impl/model/device_request.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.DeviceRequest do + @moduledoc """ + A request for devices to be sent to device drivers + """ + + @derive Jason.Encoder + defstruct [ + :Driver, + :Count, + :DeviceIDs, + :Capabilities, + :Options + ] + + @type t :: %__MODULE__{ + :Driver => String.t | nil, + :Count => integer() | nil, + :DeviceIDs => [String.t] | nil, + :Capabilities => [[String.t]] | nil, + :Options => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/distribution_inspect.ex b/lib/docker/impl/model/distribution_inspect.ex new file mode 100644 index 0000000..4bab5fe --- /dev/null +++ b/lib/docker/impl/model/distribution_inspect.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.DistributionInspect do + @moduledoc """ + Describes the result obtained from contacting the registry to retrieve image metadata. + """ + + @derive Jason.Encoder + defstruct [ + :Descriptor, + :Platforms + ] + + @type t :: %__MODULE__{ + :Descriptor => DockerEngineAPI.Model.OciDescriptor.t, + :Platforms => [DockerEngineAPI.Model.OciPlatform.t] + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Descriptor, :struct, DockerEngineAPI.Model.OciDescriptor) + |> Deserializer.deserialize(:Platforms, :list, DockerEngineAPI.Model.OciPlatform) + end +end + diff --git a/lib/docker/impl/model/driver.ex b/lib/docker/impl/model/driver.ex new file mode 100644 index 0000000..3bec351 --- /dev/null +++ b/lib/docker/impl/model/driver.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Driver do + @moduledoc """ + Driver represents a driver (network, logging, secrets). + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Options + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Options => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/endpoint_ipam_config.ex b/lib/docker/impl/model/endpoint_ipam_config.ex new file mode 100644 index 0000000..b7ac516 --- /dev/null +++ b/lib/docker/impl/model/endpoint_ipam_config.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EndpointIpamConfig do + @moduledoc """ + EndpointIPAMConfig represents an endpoint's IPAM configuration. + """ + + @derive Jason.Encoder + defstruct [ + :IPv4Address, + :IPv6Address, + :LinkLocalIPs + ] + + @type t :: %__MODULE__{ + :IPv4Address => String.t | nil, + :IPv6Address => String.t | nil, + :LinkLocalIPs => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/endpoint_port_config.ex b/lib/docker/impl/model/endpoint_port_config.ex new file mode 100644 index 0000000..010cd17 --- /dev/null +++ b/lib/docker/impl/model/endpoint_port_config.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EndpointPortConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Protocol, + :TargetPort, + :PublishedPort, + :PublishMode + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Protocol => String.t | nil, + :TargetPort => integer() | nil, + :PublishedPort => integer() | nil, + :PublishMode => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/endpoint_settings.ex b/lib/docker/impl/model/endpoint_settings.ex new file mode 100644 index 0000000..ecbf7fc --- /dev/null +++ b/lib/docker/impl/model/endpoint_settings.ex @@ -0,0 +1,49 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EndpointSettings do + @moduledoc """ + Configuration for a network endpoint. + """ + + @derive Jason.Encoder + defstruct [ + :IPAMConfig, + :Links, + :Aliases, + :NetworkID, + :EndpointID, + :Gateway, + :IPAddress, + :IPPrefixLen, + :IPv6Gateway, + :GlobalIPv6Address, + :GlobalIPv6PrefixLen, + :MacAddress, + :DriverOpts + ] + + @type t :: %__MODULE__{ + :IPAMConfig => DockerEngineAPI.Model.EndpointIpamConfig.t | nil, + :Links => [String.t] | nil, + :Aliases => [String.t] | nil, + :NetworkID => String.t | nil, + :EndpointID => String.t | nil, + :Gateway => String.t | nil, + :IPAddress => String.t | nil, + :IPPrefixLen => integer() | nil, + :IPv6Gateway => String.t | nil, + :GlobalIPv6Address => String.t | nil, + :GlobalIPv6PrefixLen => integer() | nil, + :MacAddress => String.t | nil, + :DriverOpts => %{optional(String.t) => String.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:IPAMConfig, :struct, DockerEngineAPI.Model.EndpointIpamConfig) + end +end + diff --git a/lib/docker/impl/model/endpoint_spec.ex b/lib/docker/impl/model/endpoint_spec.ex new file mode 100644 index 0000000..45687bb --- /dev/null +++ b/lib/docker/impl/model/endpoint_spec.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EndpointSpec do + @moduledoc """ + Properties that can be configured to access and load balance a service. + """ + + @derive Jason.Encoder + defstruct [ + :Mode, + :Ports + ] + + @type t :: %__MODULE__{ + :Mode => String.t | nil, + :Ports => [DockerEngineAPI.Model.EndpointPortConfig.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Ports, :list, DockerEngineAPI.Model.EndpointPortConfig) + end +end + diff --git a/lib/docker/impl/model/engine_description.ex b/lib/docker/impl/model/engine_description.ex new file mode 100644 index 0000000..895cc00 --- /dev/null +++ b/lib/docker/impl/model/engine_description.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EngineDescription do + @moduledoc """ + EngineDescription provides information about an engine. + """ + + @derive Jason.Encoder + defstruct [ + :EngineVersion, + :Labels, + :Plugins + ] + + @type t :: %__MODULE__{ + :EngineVersion => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Plugins => [DockerEngineAPI.Model.EngineDescriptionPluginsInner.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Plugins, :list, DockerEngineAPI.Model.EngineDescriptionPluginsInner) + end +end + diff --git a/lib/docker/impl/model/engine_description_plugins_inner.ex b/lib/docker/impl/model/engine_description_plugins_inner.ex new file mode 100644 index 0000000..50b8fc5 --- /dev/null +++ b/lib/docker/impl/model/engine_description_plugins_inner.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EngineDescriptionPluginsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Type, + :Name + ] + + @type t :: %__MODULE__{ + :Type => String.t | nil, + :Name => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/error_detail.ex b/lib/docker/impl/model/error_detail.ex new file mode 100644 index 0000000..146aec5 --- /dev/null +++ b/lib/docker/impl/model/error_detail.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ErrorDetail do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :code, + :message + ] + + @type t :: %__MODULE__{ + :code => integer() | nil, + :message => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/error_response.ex b/lib/docker/impl/model/error_response.ex new file mode 100644 index 0000000..f8f9280 --- /dev/null +++ b/lib/docker/impl/model/error_response.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ErrorResponse do + @moduledoc """ + Represents an error. + """ + + @derive Jason.Encoder + defstruct [ + :message + ] + + @type t :: %__MODULE__{ + :message => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/event_actor.ex b/lib/docker/impl/model/event_actor.ex new file mode 100644 index 0000000..4d469dc --- /dev/null +++ b/lib/docker/impl/model/event_actor.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EventActor do + @moduledoc """ + Actor describes something that generates events, like a container, network, or a volume. + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Attributes + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Attributes => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/event_message.ex b/lib/docker/impl/model/event_message.ex new file mode 100644 index 0000000..3a06be9 --- /dev/null +++ b/lib/docker/impl/model/event_message.ex @@ -0,0 +1,35 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.EventMessage do + @moduledoc """ + EventMessage represents the information an event contains. + """ + + @derive Jason.Encoder + defstruct [ + :Type, + :Action, + :Actor, + :scope, + :time, + :timeNano + ] + + @type t :: %__MODULE__{ + :Type => String.t | nil, + :Action => String.t | nil, + :Actor => DockerEngineAPI.Model.EventActor.t | nil, + :scope => String.t | nil, + :time => integer() | nil, + :timeNano => integer() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Actor, :struct, DockerEngineAPI.Model.EventActor) + end +end + diff --git a/lib/docker/impl/model/exec_config.ex b/lib/docker/impl/model/exec_config.ex new file mode 100644 index 0000000..11ff565 --- /dev/null +++ b/lib/docker/impl/model/exec_config.ex @@ -0,0 +1,42 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ExecConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :AttachStdin, + :AttachStdout, + :AttachStderr, + :ConsoleSize, + :DetachKeys, + :Tty, + :Env, + :Cmd, + :Privileged, + :User, + :WorkingDir + ] + + @type t :: %__MODULE__{ + :AttachStdin => boolean() | nil, + :AttachStdout => boolean() | nil, + :AttachStderr => boolean() | nil, + :ConsoleSize => [integer()] | nil, + :DetachKeys => String.t | nil, + :Tty => boolean() | nil, + :Env => [String.t] | nil, + :Cmd => [String.t] | nil, + :Privileged => boolean() | nil, + :User => String.t | nil, + :WorkingDir => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/exec_inspect_response.ex b/lib/docker/impl/model/exec_inspect_response.ex new file mode 100644 index 0000000..84a7eef --- /dev/null +++ b/lib/docker/impl/model/exec_inspect_response.ex @@ -0,0 +1,45 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ExecInspectResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :CanRemove, + :DetachKeys, + :ID, + :Running, + :ExitCode, + :ProcessConfig, + :OpenStdin, + :OpenStderr, + :OpenStdout, + :ContainerID, + :Pid + ] + + @type t :: %__MODULE__{ + :CanRemove => boolean() | nil, + :DetachKeys => String.t | nil, + :ID => String.t | nil, + :Running => boolean() | nil, + :ExitCode => integer() | nil, + :ProcessConfig => DockerEngineAPI.Model.ProcessConfig.t | nil, + :OpenStdin => boolean() | nil, + :OpenStderr => boolean() | nil, + :OpenStdout => boolean() | nil, + :ContainerID => String.t | nil, + :Pid => integer() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:ProcessConfig, :struct, DockerEngineAPI.Model.ProcessConfig) + end +end + diff --git a/lib/docker/impl/model/exec_start_config.ex b/lib/docker/impl/model/exec_start_config.ex new file mode 100644 index 0000000..dbd62b6 --- /dev/null +++ b/lib/docker/impl/model/exec_start_config.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ExecStartConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Detach, + :Tty, + :ConsoleSize + ] + + @type t :: %__MODULE__{ + :Detach => boolean() | nil, + :Tty => boolean() | nil, + :ConsoleSize => [integer()] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/filesystem_change.ex b/lib/docker/impl/model/filesystem_change.ex new file mode 100644 index 0000000..d91bb80 --- /dev/null +++ b/lib/docker/impl/model/filesystem_change.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.FilesystemChange do + @moduledoc """ + Change in the container's filesystem. + """ + + @derive Jason.Encoder + defstruct [ + :Path, + :Kind + ] + + @type t :: %__MODULE__{ + :Path => String.t, + :Kind => DockerEngineAPI.Model.ChangeType.t + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Kind, :struct, DockerEngineAPI.Model.ChangeType) + end +end + diff --git a/lib/docker/impl/model/generic_resources_inner.ex b/lib/docker/impl/model/generic_resources_inner.ex new file mode 100644 index 0000000..5c7bff3 --- /dev/null +++ b/lib/docker/impl/model/generic_resources_inner.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.GenericResourcesInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :NamedResourceSpec, + :DiscreteResourceSpec + ] + + @type t :: %__MODULE__{ + :NamedResourceSpec => DockerEngineAPI.Model.GenericResourcesInnerNamedResourceSpec.t | nil, + :DiscreteResourceSpec => DockerEngineAPI.Model.GenericResourcesInnerDiscreteResourceSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:NamedResourceSpec, :struct, DockerEngineAPI.Model.GenericResourcesInnerNamedResourceSpec) + |> Deserializer.deserialize(:DiscreteResourceSpec, :struct, DockerEngineAPI.Model.GenericResourcesInnerDiscreteResourceSpec) + end +end + diff --git a/lib/docker/impl/model/generic_resources_inner_discrete_resource_spec.ex b/lib/docker/impl/model/generic_resources_inner_discrete_resource_spec.ex new file mode 100644 index 0000000..1fc6363 --- /dev/null +++ b/lib/docker/impl/model/generic_resources_inner_discrete_resource_spec.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.GenericResourcesInnerDiscreteResourceSpec do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Kind, + :Value + ] + + @type t :: %__MODULE__{ + :Kind => String.t | nil, + :Value => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/generic_resources_inner_named_resource_spec.ex b/lib/docker/impl/model/generic_resources_inner_named_resource_spec.ex new file mode 100644 index 0000000..a9b1523 --- /dev/null +++ b/lib/docker/impl/model/generic_resources_inner_named_resource_spec.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.GenericResourcesInnerNamedResourceSpec do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Kind, + :Value + ] + + @type t :: %__MODULE__{ + :Kind => String.t | nil, + :Value => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/graph_driver_data.ex b/lib/docker/impl/model/graph_driver_data.ex new file mode 100644 index 0000000..e09913a --- /dev/null +++ b/lib/docker/impl/model/graph_driver_data.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.GraphDriverData do + @moduledoc """ + Information about the storage driver used to store the container's and image's filesystem. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Data + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Data => %{optional(String.t) => String.t} + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/health.ex b/lib/docker/impl/model/health.ex new file mode 100644 index 0000000..371c3ea --- /dev/null +++ b/lib/docker/impl/model/health.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Health do + @moduledoc """ + Health stores information about the container's healthcheck results. + """ + + @derive Jason.Encoder + defstruct [ + :Status, + :FailingStreak, + :Log + ] + + @type t :: %__MODULE__{ + :Status => String.t | nil, + :FailingStreak => integer() | nil, + :Log => [DockerEngineAPI.Model.HealthcheckResult.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Log, :list, DockerEngineAPI.Model.HealthcheckResult) + end +end + diff --git a/lib/docker/impl/model/health_config.ex b/lib/docker/impl/model/health_config.ex new file mode 100644 index 0000000..ef77293 --- /dev/null +++ b/lib/docker/impl/model/health_config.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.HealthConfig do + @moduledoc """ + A test to perform to check that the container is healthy. + """ + + @derive Jason.Encoder + defstruct [ + :Test, + :Interval, + :Timeout, + :Retries, + :StartPeriod + ] + + @type t :: %__MODULE__{ + :Test => [String.t] | nil, + :Interval => integer() | nil, + :Timeout => integer() | nil, + :Retries => integer() | nil, + :StartPeriod => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/healthcheck_result.ex b/lib/docker/impl/model/healthcheck_result.ex new file mode 100644 index 0000000..6faeeb1 --- /dev/null +++ b/lib/docker/impl/model/healthcheck_result.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.HealthcheckResult do + @moduledoc """ + HealthcheckResult stores information about a single run of a healthcheck probe + """ + + @derive Jason.Encoder + defstruct [ + :Start, + :End, + :ExitCode, + :Output + ] + + @type t :: %__MODULE__{ + :Start => DateTime.t | nil, + :End => String.t | nil, + :ExitCode => integer() | nil, + :Output => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Start, :datetime, nil) + end +end + diff --git a/lib/docker/impl/model/history_response_item.ex b/lib/docker/impl/model/history_response_item.ex new file mode 100644 index 0000000..1ec95f4 --- /dev/null +++ b/lib/docker/impl/model/history_response_item.ex @@ -0,0 +1,32 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.HistoryResponseItem do + @moduledoc """ + individual image layer information in response to ImageHistory operation + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :Created, + :CreatedBy, + :Tags, + :Size, + :Comment + ] + + @type t :: %__MODULE__{ + :Id => String.t, + :Created => integer(), + :CreatedBy => String.t, + :Tags => [String.t], + :Size => integer(), + :Comment => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/host_config.ex b/lib/docker/impl/model/host_config.ex new file mode 100644 index 0000000..39f3e2f --- /dev/null +++ b/lib/docker/impl/model/host_config.ex @@ -0,0 +1,173 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.HostConfig do + @moduledoc """ + Container configuration that depends on the host we are running on + """ + + @derive Jason.Encoder + defstruct [ + :CpuShares, + :Memory, + :CgroupParent, + :BlkioWeight, + :BlkioWeightDevice, + :BlkioDeviceReadBps, + :BlkioDeviceWriteBps, + :BlkioDeviceReadIOps, + :BlkioDeviceWriteIOps, + :CpuPeriod, + :CpuQuota, + :CpuRealtimePeriod, + :CpuRealtimeRuntime, + :CpusetCpus, + :CpusetMems, + :Devices, + :DeviceCgroupRules, + :DeviceRequests, + :KernelMemoryTCP, + :MemoryReservation, + :MemorySwap, + :MemorySwappiness, + :NanoCpus, + :OomKillDisable, + :Init, + :PidsLimit, + :Ulimits, + :CpuCount, + :CpuPercent, + :IOMaximumIOps, + :IOMaximumBandwidth, + :Binds, + :ContainerIDFile, + :LogConfig, + :NetworkMode, + :PortBindings, + :RestartPolicy, + :AutoRemove, + :VolumeDriver, + :VolumesFrom, + :Mounts, + :ConsoleSize, + :Annotations, + :CapAdd, + :CapDrop, + :CgroupnsMode, + :Dns, + :DnsOptions, + :DnsSearch, + :ExtraHosts, + :GroupAdd, + :IpcMode, + :Cgroup, + :Links, + :OomScoreAdj, + :PidMode, + :Privileged, + :PublishAllPorts, + :ReadonlyRootfs, + :SecurityOpt, + :StorageOpt, + :Tmpfs, + :UTSMode, + :UsernsMode, + :ShmSize, + :Sysctls, + :Runtime, + :Isolation, + :MaskedPaths, + :ReadonlyPaths + ] + + @type t :: %__MODULE__{ + :CpuShares => integer() | nil, + :Memory => integer() | nil, + :CgroupParent => String.t | nil, + :BlkioWeight => integer() | nil, + :BlkioWeightDevice => [DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner.t] | nil, + :BlkioDeviceReadBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceWriteBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceReadIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceWriteIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :CpuPeriod => integer() | nil, + :CpuQuota => integer() | nil, + :CpuRealtimePeriod => integer() | nil, + :CpuRealtimeRuntime => integer() | nil, + :CpusetCpus => String.t | nil, + :CpusetMems => String.t | nil, + :Devices => [DockerEngineAPI.Model.DeviceMapping.t] | nil, + :DeviceCgroupRules => [String.t] | nil, + :DeviceRequests => [DockerEngineAPI.Model.DeviceRequest.t] | nil, + :KernelMemoryTCP => integer() | nil, + :MemoryReservation => integer() | nil, + :MemorySwap => integer() | nil, + :MemorySwappiness => integer() | nil, + :NanoCpus => integer() | nil, + :OomKillDisable => boolean() | nil, + :Init => boolean() | nil, + :PidsLimit => integer() | nil, + :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil, + :CpuCount => integer() | nil, + :CpuPercent => integer() | nil, + :IOMaximumIOps => integer() | nil, + :IOMaximumBandwidth => integer() | nil, + :Binds => [String.t] | nil, + :ContainerIDFile => String.t | nil, + :LogConfig => DockerEngineAPI.Model.HostConfigAllOfLogConfig.t | nil, + :NetworkMode => String.t | nil, + :PortBindings => %{optional(String.t) => [DockerEngineAPI.Model.PortBinding.t]} | nil, + :RestartPolicy => DockerEngineAPI.Model.RestartPolicy.t | nil, + :AutoRemove => boolean() | nil, + :VolumeDriver => String.t | nil, + :VolumesFrom => [String.t] | nil, + :Mounts => [DockerEngineAPI.Model.Mount.t] | nil, + :ConsoleSize => [integer()] | nil, + :Annotations => %{optional(String.t) => String.t} | nil, + :CapAdd => [String.t] | nil, + :CapDrop => [String.t] | nil, + :CgroupnsMode => String.t | nil, + :Dns => [String.t] | nil, + :DnsOptions => [String.t] | nil, + :DnsSearch => [String.t] | nil, + :ExtraHosts => [String.t] | nil, + :GroupAdd => [String.t] | nil, + :IpcMode => String.t | nil, + :Cgroup => String.t | nil, + :Links => [String.t] | nil, + :OomScoreAdj => integer() | nil, + :PidMode => String.t | nil, + :Privileged => boolean() | nil, + :PublishAllPorts => boolean() | nil, + :ReadonlyRootfs => boolean() | nil, + :SecurityOpt => [String.t] | nil, + :StorageOpt => %{optional(String.t) => String.t} | nil, + :Tmpfs => %{optional(String.t) => String.t} | nil, + :UTSMode => String.t | nil, + :UsernsMode => String.t | nil, + :ShmSize => integer() | nil, + :Sysctls => %{optional(String.t) => String.t} | nil, + :Runtime => String.t | nil, + :Isolation => String.t | nil, + :MaskedPaths => [String.t] | nil, + :ReadonlyPaths => [String.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:BlkioWeightDevice, :list, DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner) + |> Deserializer.deserialize(:BlkioDeviceReadBps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceWriteBps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceReadIOps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceWriteIOps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.DeviceMapping) + |> Deserializer.deserialize(:DeviceRequests, :list, DockerEngineAPI.Model.DeviceRequest) + |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner) + |> Deserializer.deserialize(:LogConfig, :struct, DockerEngineAPI.Model.HostConfigAllOfLogConfig) + |> Deserializer.deserialize(:RestartPolicy, :struct, DockerEngineAPI.Model.RestartPolicy) + |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.Mount) + end +end + diff --git a/lib/docker/impl/model/host_config_all_of_log_config.ex b/lib/docker/impl/model/host_config_all_of_log_config.ex new file mode 100644 index 0000000..097a607 --- /dev/null +++ b/lib/docker/impl/model/host_config_all_of_log_config.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.HostConfigAllOfLogConfig do + @moduledoc """ + The logging configuration for this container + """ + + @derive Jason.Encoder + defstruct [ + :Type, + :Config + ] + + @type t :: %__MODULE__{ + :Type => String.t | nil, + :Config => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/id_response.ex b/lib/docker/impl/model/id_response.ex new file mode 100644 index 0000000..f701729 --- /dev/null +++ b/lib/docker/impl/model/id_response.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.IdResponse do + @moduledoc """ + Response to an API call that returns just an Id + """ + + @derive Jason.Encoder + defstruct [ + :Id + ] + + @type t :: %__MODULE__{ + :Id => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/image_delete_response_item.ex b/lib/docker/impl/model/image_delete_response_item.ex new file mode 100644 index 0000000..44af1d9 --- /dev/null +++ b/lib/docker/impl/model/image_delete_response_item.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageDeleteResponseItem do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Untagged, + :Deleted + ] + + @type t :: %__MODULE__{ + :Untagged => String.t | nil, + :Deleted => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/image_id.ex b/lib/docker/impl/model/image_id.ex new file mode 100644 index 0000000..8cb5cf4 --- /dev/null +++ b/lib/docker/impl/model/image_id.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageId do + @moduledoc """ + Image ID or Digest + """ + + @derive Jason.Encoder + defstruct [ + :ID + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/image_inspect.ex b/lib/docker/impl/model/image_inspect.ex new file mode 100644 index 0000000..5a366f2 --- /dev/null +++ b/lib/docker/impl/model/image_inspect.ex @@ -0,0 +1,67 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageInspect do + @moduledoc """ + Information about an image in the local image cache. + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :RepoTags, + :RepoDigests, + :Parent, + :Comment, + :Created, + :Container, + :ContainerConfig, + :DockerVersion, + :Author, + :Config, + :Architecture, + :Variant, + :Os, + :OsVersion, + :Size, + :VirtualSize, + :GraphDriver, + :RootFS, + :Metadata + ] + + @type t :: %__MODULE__{ + :Id => String.t | nil, + :RepoTags => [String.t] | nil, + :RepoDigests => [String.t] | nil, + :Parent => String.t | nil, + :Comment => String.t | nil, + :Created => String.t | nil, + :Container => String.t | nil, + :ContainerConfig => DockerEngineAPI.Model.ContainerConfig.t | nil, + :DockerVersion => String.t | nil, + :Author => String.t | nil, + :Config => DockerEngineAPI.Model.ContainerConfig.t | nil, + :Architecture => String.t | nil, + :Variant => String.t | nil, + :Os => String.t | nil, + :OsVersion => String.t | nil, + :Size => integer() | nil, + :VirtualSize => integer() | nil, + :GraphDriver => DockerEngineAPI.Model.GraphDriverData.t | nil, + :RootFS => DockerEngineAPI.Model.ImageInspectRootFs.t | nil, + :Metadata => DockerEngineAPI.Model.ImageInspectMetadata.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:ContainerConfig, :struct, DockerEngineAPI.Model.ContainerConfig) + |> Deserializer.deserialize(:Config, :struct, DockerEngineAPI.Model.ContainerConfig) + |> Deserializer.deserialize(:GraphDriver, :struct, DockerEngineAPI.Model.GraphDriverData) + |> Deserializer.deserialize(:RootFS, :struct, DockerEngineAPI.Model.ImageInspectRootFs) + |> Deserializer.deserialize(:Metadata, :struct, DockerEngineAPI.Model.ImageInspectMetadata) + end +end + diff --git a/lib/docker/impl/model/image_inspect_metadata.ex b/lib/docker/impl/model/image_inspect_metadata.ex new file mode 100644 index 0000000..f143387 --- /dev/null +++ b/lib/docker/impl/model/image_inspect_metadata.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageInspectMetadata do + @moduledoc """ + Additional metadata of the image in the local cache. This information is local to the daemon, and not part of the image itself. + """ + + @derive Jason.Encoder + defstruct [ + :LastTagTime + ] + + @type t :: %__MODULE__{ + :LastTagTime => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/image_inspect_root_fs.ex b/lib/docker/impl/model/image_inspect_root_fs.ex new file mode 100644 index 0000000..9ac86b4 --- /dev/null +++ b/lib/docker/impl/model/image_inspect_root_fs.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageInspectRootFs do + @moduledoc """ + Information about the image's RootFS, including the layer IDs. + """ + + @derive Jason.Encoder + defstruct [ + :Type, + :Layers + ] + + @type t :: %__MODULE__{ + :Type => String.t, + :Layers => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/image_prune_response.ex b/lib/docker/impl/model/image_prune_response.ex new file mode 100644 index 0000000..2f6cb4a --- /dev/null +++ b/lib/docker/impl/model/image_prune_response.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImagePruneResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ImagesDeleted, + :SpaceReclaimed + ] + + @type t :: %__MODULE__{ + :ImagesDeleted => [DockerEngineAPI.Model.ImageDeleteResponseItem.t] | nil, + :SpaceReclaimed => integer() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:ImagesDeleted, :list, DockerEngineAPI.Model.ImageDeleteResponseItem) + end +end + diff --git a/lib/docker/impl/model/image_search_response_item.ex b/lib/docker/impl/model/image_search_response_item.ex new file mode 100644 index 0000000..0016735 --- /dev/null +++ b/lib/docker/impl/model/image_search_response_item.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageSearchResponseItem do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :description, + :is_official, + :is_automated, + :name, + :star_count + ] + + @type t :: %__MODULE__{ + :description => String.t | nil, + :is_official => boolean() | nil, + :is_automated => boolean() | nil, + :name => String.t | nil, + :star_count => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/image_summary.ex b/lib/docker/impl/model/image_summary.ex new file mode 100644 index 0000000..6038aac --- /dev/null +++ b/lib/docker/impl/model/image_summary.ex @@ -0,0 +1,40 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ImageSummary do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :ParentId, + :RepoTags, + :RepoDigests, + :Created, + :Size, + :SharedSize, + :VirtualSize, + :Labels, + :Containers + ] + + @type t :: %__MODULE__{ + :Id => String.t, + :ParentId => String.t, + :RepoTags => [String.t], + :RepoDigests => [String.t], + :Created => integer(), + :Size => integer(), + :SharedSize => integer(), + :VirtualSize => integer() | nil, + :Labels => %{optional(String.t) => String.t}, + :Containers => integer() + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/index_info.ex b/lib/docker/impl/model/index_info.ex new file mode 100644 index 0000000..38487ff --- /dev/null +++ b/lib/docker/impl/model/index_info.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.IndexInfo do + @moduledoc """ + IndexInfo contains information about a registry. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Mirrors, + :Secure, + :Official + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Mirrors => [String.t] | nil, + :Secure => boolean() | nil, + :Official => boolean() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/ipam.ex b/lib/docker/impl/model/ipam.ex new file mode 100644 index 0000000..626c0a3 --- /dev/null +++ b/lib/docker/impl/model/ipam.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Ipam do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Driver, + :Config, + :Options + ] + + @type t :: %__MODULE__{ + :Driver => String.t | nil, + :Config => [DockerEngineAPI.Model.IpamConfig.t] | nil, + :Options => %{optional(String.t) => String.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Config, :list, DockerEngineAPI.Model.IpamConfig) + end +end + diff --git a/lib/docker/impl/model/ipam_config.ex b/lib/docker/impl/model/ipam_config.ex new file mode 100644 index 0000000..0084d66 --- /dev/null +++ b/lib/docker/impl/model/ipam_config.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.IpamConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Subnet, + :IPRange, + :Gateway, + :AuxiliaryAddresses + ] + + @type t :: %__MODULE__{ + :Subnet => String.t | nil, + :IPRange => String.t | nil, + :Gateway => String.t | nil, + :AuxiliaryAddresses => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/join_tokens.ex b/lib/docker/impl/model/join_tokens.ex new file mode 100644 index 0000000..35ae4e4 --- /dev/null +++ b/lib/docker/impl/model/join_tokens.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.JoinTokens do + @moduledoc """ + JoinTokens contains the tokens workers and managers need to join the swarm. + """ + + @derive Jason.Encoder + defstruct [ + :Worker, + :Manager + ] + + @type t :: %__MODULE__{ + :Worker => String.t | nil, + :Manager => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/limit.ex b/lib/docker/impl/model/limit.ex new file mode 100644 index 0000000..c0a9cd7 --- /dev/null +++ b/lib/docker/impl/model/limit.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Limit do + @moduledoc """ + An object describing a limit on resources which can be requested by a task. + """ + + @derive Jason.Encoder + defstruct [ + :NanoCPUs, + :MemoryBytes, + :Pids + ] + + @type t :: %__MODULE__{ + :NanoCPUs => integer() | nil, + :MemoryBytes => integer() | nil, + :Pids => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/local_node_state.ex b/lib/docker/impl/model/local_node_state.ex new file mode 100644 index 0000000..8e40866 --- /dev/null +++ b/lib/docker/impl/model/local_node_state.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.LocalNodeState do + @moduledoc """ + Current local status of this node. + """ + + @derive Jason.Encoder + defstruct [ + + ] + + @type t :: %__MODULE__{ + + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/manager_status.ex b/lib/docker/impl/model/manager_status.ex new file mode 100644 index 0000000..a90bf1b --- /dev/null +++ b/lib/docker/impl/model/manager_status.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ManagerStatus do + @moduledoc """ + ManagerStatus represents the status of a manager. It provides the current status of a node's manager component, if the node is a manager. + """ + + @derive Jason.Encoder + defstruct [ + :Leader, + :Reachability, + :Addr + ] + + @type t :: %__MODULE__{ + :Leader => boolean() | nil, + :Reachability => DockerEngineAPI.Model.Reachability.t | nil, + :Addr => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Reachability, :struct, DockerEngineAPI.Model.Reachability) + end +end + diff --git a/lib/docker/impl/model/mount.ex b/lib/docker/impl/model/mount.ex new file mode 100644 index 0000000..6ce9ab0 --- /dev/null +++ b/lib/docker/impl/model/mount.ex @@ -0,0 +1,41 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Mount do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Target, + :Source, + :Type, + :ReadOnly, + :Consistency, + :BindOptions, + :VolumeOptions, + :TmpfsOptions + ] + + @type t :: %__MODULE__{ + :Target => String.t | nil, + :Source => String.t | nil, + :Type => String.t | nil, + :ReadOnly => boolean() | nil, + :Consistency => String.t | nil, + :BindOptions => DockerEngineAPI.Model.MountBindOptions.t | nil, + :VolumeOptions => DockerEngineAPI.Model.MountVolumeOptions.t | nil, + :TmpfsOptions => DockerEngineAPI.Model.MountTmpfsOptions.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:BindOptions, :struct, DockerEngineAPI.Model.MountBindOptions) + |> Deserializer.deserialize(:VolumeOptions, :struct, DockerEngineAPI.Model.MountVolumeOptions) + |> Deserializer.deserialize(:TmpfsOptions, :struct, DockerEngineAPI.Model.MountTmpfsOptions) + end +end + diff --git a/lib/docker/impl/model/mount_bind_options.ex b/lib/docker/impl/model/mount_bind_options.ex new file mode 100644 index 0000000..75f78ce --- /dev/null +++ b/lib/docker/impl/model/mount_bind_options.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.MountBindOptions do + @moduledoc """ + Optional configuration for the `bind` type. + """ + + @derive Jason.Encoder + defstruct [ + :Propagation, + :NonRecursive, + :CreateMountpoint + ] + + @type t :: %__MODULE__{ + :Propagation => String.t | nil, + :NonRecursive => boolean() | nil, + :CreateMountpoint => boolean() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/mount_point.ex b/lib/docker/impl/model/mount_point.ex new file mode 100644 index 0000000..da2d5d0 --- /dev/null +++ b/lib/docker/impl/model/mount_point.ex @@ -0,0 +1,36 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.MountPoint do + @moduledoc """ + MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container. + """ + + @derive Jason.Encoder + defstruct [ + :Type, + :Name, + :Source, + :Destination, + :Driver, + :Mode, + :RW, + :Propagation + ] + + @type t :: %__MODULE__{ + :Type => String.t | nil, + :Name => String.t | nil, + :Source => String.t | nil, + :Destination => String.t | nil, + :Driver => String.t | nil, + :Mode => String.t | nil, + :RW => boolean() | nil, + :Propagation => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/mount_tmpfs_options.ex b/lib/docker/impl/model/mount_tmpfs_options.ex new file mode 100644 index 0000000..cac78e4 --- /dev/null +++ b/lib/docker/impl/model/mount_tmpfs_options.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.MountTmpfsOptions do + @moduledoc """ + Optional configuration for the `tmpfs` type. + """ + + @derive Jason.Encoder + defstruct [ + :SizeBytes, + :Mode + ] + + @type t :: %__MODULE__{ + :SizeBytes => integer() | nil, + :Mode => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/mount_volume_options.ex b/lib/docker/impl/model/mount_volume_options.ex new file mode 100644 index 0000000..475f172 --- /dev/null +++ b/lib/docker/impl/model/mount_volume_options.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.MountVolumeOptions do + @moduledoc """ + Optional configuration for the `volume` type. + """ + + @derive Jason.Encoder + defstruct [ + :NoCopy, + :Labels, + :DriverConfig + ] + + @type t :: %__MODULE__{ + :NoCopy => boolean() | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :DriverConfig => DockerEngineAPI.Model.MountVolumeOptionsDriverConfig.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:DriverConfig, :struct, DockerEngineAPI.Model.MountVolumeOptionsDriverConfig) + end +end + diff --git a/lib/docker/impl/model/mount_volume_options_driver_config.ex b/lib/docker/impl/model/mount_volume_options_driver_config.ex new file mode 100644 index 0000000..c7e72e1 --- /dev/null +++ b/lib/docker/impl/model/mount_volume_options_driver_config.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.MountVolumeOptionsDriverConfig do + @moduledoc """ + Map of driver specific options + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Options + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Options => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/network.ex b/lib/docker/impl/model/network.ex new file mode 100644 index 0000000..91e8b22 --- /dev/null +++ b/lib/docker/impl/model/network.ex @@ -0,0 +1,50 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Network do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Id, + :Created, + :Scope, + :Driver, + :EnableIPv6, + :IPAM, + :Internal, + :Attachable, + :Ingress, + :Containers, + :Options, + :Labels + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Id => String.t | nil, + :Created => String.t | nil, + :Scope => String.t | nil, + :Driver => String.t | nil, + :EnableIPv6 => boolean() | nil, + :IPAM => DockerEngineAPI.Model.Ipam.t | nil, + :Internal => boolean() | nil, + :Attachable => boolean() | nil, + :Ingress => boolean() | nil, + :Containers => %{optional(String.t) => DockerEngineAPI.Model.NetworkContainer.t} | nil, + :Options => %{optional(String.t) => String.t} | nil, + :Labels => %{optional(String.t) => String.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:IPAM, :struct, DockerEngineAPI.Model.Ipam) + |> Deserializer.deserialize(:Containers, :map, DockerEngineAPI.Model.NetworkContainer) + end +end + diff --git a/lib/docker/impl/model/network_attachment_config.ex b/lib/docker/impl/model/network_attachment_config.ex new file mode 100644 index 0000000..59439d2 --- /dev/null +++ b/lib/docker/impl/model/network_attachment_config.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkAttachmentConfig do + @moduledoc """ + Specifies how a service should be attached to a particular network. + """ + + @derive Jason.Encoder + defstruct [ + :Target, + :Aliases, + :DriverOpts + ] + + @type t :: %__MODULE__{ + :Target => String.t | nil, + :Aliases => [String.t] | nil, + :DriverOpts => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/network_connect_request.ex b/lib/docker/impl/model/network_connect_request.ex new file mode 100644 index 0000000..eaab1df --- /dev/null +++ b/lib/docker/impl/model/network_connect_request.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkConnectRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Container, + :EndpointConfig + ] + + @type t :: %__MODULE__{ + :Container => String.t | nil, + :EndpointConfig => DockerEngineAPI.Model.EndpointSettings.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:EndpointConfig, :struct, DockerEngineAPI.Model.EndpointSettings) + end +end + diff --git a/lib/docker/impl/model/network_container.ex b/lib/docker/impl/model/network_container.ex new file mode 100644 index 0000000..3fc8219 --- /dev/null +++ b/lib/docker/impl/model/network_container.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkContainer do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :EndpointID, + :MacAddress, + :IPv4Address, + :IPv6Address + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :EndpointID => String.t | nil, + :MacAddress => String.t | nil, + :IPv4Address => String.t | nil, + :IPv6Address => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/network_create_request.ex b/lib/docker/impl/model/network_create_request.ex new file mode 100644 index 0000000..245f2b3 --- /dev/null +++ b/lib/docker/impl/model/network_create_request.ex @@ -0,0 +1,43 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkCreateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :CheckDuplicate, + :Driver, + :Internal, + :Attachable, + :Ingress, + :IPAM, + :EnableIPv6, + :Options, + :Labels + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :CheckDuplicate => boolean() | nil, + :Driver => String.t | nil, + :Internal => boolean() | nil, + :Attachable => boolean() | nil, + :Ingress => boolean() | nil, + :IPAM => DockerEngineAPI.Model.Ipam.t | nil, + :EnableIPv6 => boolean() | nil, + :Options => %{optional(String.t) => String.t} | nil, + :Labels => %{optional(String.t) => String.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:IPAM, :struct, DockerEngineAPI.Model.Ipam) + end +end + diff --git a/lib/docker/impl/model/network_create_response.ex b/lib/docker/impl/model/network_create_response.ex new file mode 100644 index 0000000..4b99686 --- /dev/null +++ b/lib/docker/impl/model/network_create_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkCreateResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :Warning + ] + + @type t :: %__MODULE__{ + :Id => String.t | nil, + :Warning => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/network_disconnect_request.ex b/lib/docker/impl/model/network_disconnect_request.ex new file mode 100644 index 0000000..9fd419b --- /dev/null +++ b/lib/docker/impl/model/network_disconnect_request.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkDisconnectRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Container, + :Force + ] + + @type t :: %__MODULE__{ + :Container => String.t | nil, + :Force => boolean() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/network_prune_response.ex b/lib/docker/impl/model/network_prune_response.ex new file mode 100644 index 0000000..583112b --- /dev/null +++ b/lib/docker/impl/model/network_prune_response.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkPruneResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :NetworksDeleted + ] + + @type t :: %__MODULE__{ + :NetworksDeleted => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/network_settings.ex b/lib/docker/impl/model/network_settings.ex new file mode 100644 index 0000000..85c5480 --- /dev/null +++ b/lib/docker/impl/model/network_settings.ex @@ -0,0 +1,61 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkSettings do + @moduledoc """ + NetworkSettings exposes the network settings in the API + """ + + @derive Jason.Encoder + defstruct [ + :Bridge, + :SandboxID, + :HairpinMode, + :LinkLocalIPv6Address, + :LinkLocalIPv6PrefixLen, + :Ports, + :SandboxKey, + :SecondaryIPAddresses, + :SecondaryIPv6Addresses, + :EndpointID, + :Gateway, + :GlobalIPv6Address, + :GlobalIPv6PrefixLen, + :IPAddress, + :IPPrefixLen, + :IPv6Gateway, + :MacAddress, + :Networks + ] + + @type t :: %__MODULE__{ + :Bridge => String.t | nil, + :SandboxID => String.t | nil, + :HairpinMode => boolean() | nil, + :LinkLocalIPv6Address => String.t | nil, + :LinkLocalIPv6PrefixLen => integer() | nil, + :Ports => %{optional(String.t) => [DockerEngineAPI.Model.PortBinding.t]} | nil, + :SandboxKey => String.t | nil, + :SecondaryIPAddresses => [DockerEngineAPI.Model.Address.t] | nil, + :SecondaryIPv6Addresses => [DockerEngineAPI.Model.Address.t] | nil, + :EndpointID => String.t | nil, + :Gateway => String.t | nil, + :GlobalIPv6Address => String.t | nil, + :GlobalIPv6PrefixLen => integer() | nil, + :IPAddress => String.t | nil, + :IPPrefixLen => integer() | nil, + :IPv6Gateway => String.t | nil, + :MacAddress => String.t | nil, + :Networks => %{optional(String.t) => DockerEngineAPI.Model.EndpointSettings.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:SecondaryIPAddresses, :list, DockerEngineAPI.Model.Address) + |> Deserializer.deserialize(:SecondaryIPv6Addresses, :list, DockerEngineAPI.Model.Address) + |> Deserializer.deserialize(:Networks, :map, DockerEngineAPI.Model.EndpointSettings) + end +end + diff --git a/lib/docker/impl/model/networking_config.ex b/lib/docker/impl/model/networking_config.ex new file mode 100644 index 0000000..4f7c150 --- /dev/null +++ b/lib/docker/impl/model/networking_config.ex @@ -0,0 +1,25 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NetworkingConfig do + @moduledoc """ + NetworkingConfig represents the container's networking configuration for each of its interfaces. It is used for the networking configs specified in the `docker create` and `docker network connect` commands. + """ + + @derive Jason.Encoder + defstruct [ + :EndpointsConfig + ] + + @type t :: %__MODULE__{ + :EndpointsConfig => %{optional(String.t) => DockerEngineAPI.Model.EndpointSettings.t} | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:EndpointsConfig, :map, DockerEngineAPI.Model.EndpointSettings) + end +end + diff --git a/lib/docker/impl/model/node.ex b/lib/docker/impl/model/node.ex new file mode 100644 index 0000000..3bad639 --- /dev/null +++ b/lib/docker/impl/model/node.ex @@ -0,0 +1,43 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Node do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec, + :Description, + :Status, + :ManagerStatus + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.NodeSpec.t | nil, + :Description => DockerEngineAPI.Model.NodeDescription.t | nil, + :Status => DockerEngineAPI.Model.NodeStatus.t | nil, + :ManagerStatus => DockerEngineAPI.Model.ManagerStatus.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.NodeSpec) + |> Deserializer.deserialize(:Description, :struct, DockerEngineAPI.Model.NodeDescription) + |> Deserializer.deserialize(:Status, :struct, DockerEngineAPI.Model.NodeStatus) + |> Deserializer.deserialize(:ManagerStatus, :struct, DockerEngineAPI.Model.ManagerStatus) + end +end + diff --git a/lib/docker/impl/model/node_description.ex b/lib/docker/impl/model/node_description.ex new file mode 100644 index 0000000..3b73590 --- /dev/null +++ b/lib/docker/impl/model/node_description.ex @@ -0,0 +1,36 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NodeDescription do + @moduledoc """ + NodeDescription encapsulates the properties of the Node as reported by the agent. + """ + + @derive Jason.Encoder + defstruct [ + :Hostname, + :Platform, + :Resources, + :Engine, + :TLSInfo + ] + + @type t :: %__MODULE__{ + :Hostname => String.t | nil, + :Platform => DockerEngineAPI.Model.Platform.t | nil, + :Resources => DockerEngineAPI.Model.ResourceObject.t | nil, + :Engine => DockerEngineAPI.Model.EngineDescription.t | nil, + :TLSInfo => DockerEngineAPI.Model.TlsInfo.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Platform, :struct, DockerEngineAPI.Model.Platform) + |> Deserializer.deserialize(:Resources, :struct, DockerEngineAPI.Model.ResourceObject) + |> Deserializer.deserialize(:Engine, :struct, DockerEngineAPI.Model.EngineDescription) + |> Deserializer.deserialize(:TLSInfo, :struct, DockerEngineAPI.Model.TlsInfo) + end +end + diff --git a/lib/docker/impl/model/node_spec.ex b/lib/docker/impl/model/node_spec.ex new file mode 100644 index 0000000..6e21808 --- /dev/null +++ b/lib/docker/impl/model/node_spec.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NodeSpec do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :Role, + :Availability + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Role => String.t | nil, + :Availability => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/node_state.ex b/lib/docker/impl/model/node_state.ex new file mode 100644 index 0000000..2e2abd3 --- /dev/null +++ b/lib/docker/impl/model/node_state.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NodeState do + @moduledoc """ + NodeState represents the state of a node. + """ + + @derive Jason.Encoder + defstruct [ + + ] + + @type t :: %__MODULE__{ + + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/node_status.ex b/lib/docker/impl/model/node_status.ex new file mode 100644 index 0000000..6604600 --- /dev/null +++ b/lib/docker/impl/model/node_status.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.NodeStatus do + @moduledoc """ + NodeStatus represents the status of a node. It provides the current status of the node, as seen by the manager. + """ + + @derive Jason.Encoder + defstruct [ + :State, + :Message, + :Addr + ] + + @type t :: %__MODULE__{ + :State => DockerEngineAPI.Model.NodeState.t | nil, + :Message => String.t | nil, + :Addr => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:State, :struct, DockerEngineAPI.Model.NodeState) + end +end + diff --git a/lib/docker/impl/model/object_version.ex b/lib/docker/impl/model/object_version.ex new file mode 100644 index 0000000..3a866ea --- /dev/null +++ b/lib/docker/impl/model/object_version.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ObjectVersion do + @moduledoc """ + The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects. This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other. + """ + + @derive Jason.Encoder + defstruct [ + :Index + ] + + @type t :: %__MODULE__{ + :Index => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/oci_descriptor.ex b/lib/docker/impl/model/oci_descriptor.ex new file mode 100644 index 0000000..aee71e3 --- /dev/null +++ b/lib/docker/impl/model/oci_descriptor.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.OciDescriptor do + @moduledoc """ + A descriptor struct containing digest, media type, and size, as defined in the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + """ + + @derive Jason.Encoder + defstruct [ + :mediaType, + :digest, + :size + ] + + @type t :: %__MODULE__{ + :mediaType => String.t | nil, + :digest => String.t | nil, + :size => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/oci_platform.ex b/lib/docker/impl/model/oci_platform.ex new file mode 100644 index 0000000..045babc --- /dev/null +++ b/lib/docker/impl/model/oci_platform.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.OciPlatform do + @moduledoc """ + Describes the platform which the image in the manifest runs on, as defined in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + """ + + @derive Jason.Encoder + defstruct [ + :architecture, + :os, + :"os.version", + :"os.features", + :variant + ] + + @type t :: %__MODULE__{ + :architecture => String.t | nil, + :os => String.t | nil, + :"os.version" => String.t | nil, + :"os.features" => [String.t] | nil, + :variant => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/peer_node.ex b/lib/docker/impl/model/peer_node.ex new file mode 100644 index 0000000..df58f7d --- /dev/null +++ b/lib/docker/impl/model/peer_node.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PeerNode do + @moduledoc """ + Represents a peer-node in the swarm + """ + + @derive Jason.Encoder + defstruct [ + :NodeID, + :Addr + ] + + @type t :: %__MODULE__{ + :NodeID => String.t | nil, + :Addr => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/platform.ex b/lib/docker/impl/model/platform.ex new file mode 100644 index 0000000..0b66802 --- /dev/null +++ b/lib/docker/impl/model/platform.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Platform do + @moduledoc """ + Platform represents the platform (Arch/OS). + """ + + @derive Jason.Encoder + defstruct [ + :Architecture, + :OS + ] + + @type t :: %__MODULE__{ + :Architecture => String.t | nil, + :OS => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin.ex b/lib/docker/impl/model/plugin.ex new file mode 100644 index 0000000..b5d8618 --- /dev/null +++ b/lib/docker/impl/model/plugin.ex @@ -0,0 +1,36 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Plugin do + @moduledoc """ + A plugin for the Engine API + """ + + @derive Jason.Encoder + defstruct [ + :Id, + :Name, + :Enabled, + :Settings, + :PluginReference, + :Config + ] + + @type t :: %__MODULE__{ + :Id => String.t | nil, + :Name => String.t, + :Enabled => boolean(), + :Settings => DockerEngineAPI.Model.PluginSettings.t, + :PluginReference => String.t | nil, + :Config => DockerEngineAPI.Model.PluginConfig.t + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Settings, :struct, DockerEngineAPI.Model.PluginSettings) + |> Deserializer.deserialize(:Config, :struct, DockerEngineAPI.Model.PluginConfig) + end +end + diff --git a/lib/docker/impl/model/plugin_config.ex b/lib/docker/impl/model/plugin_config.ex new file mode 100644 index 0000000..5cbbe44 --- /dev/null +++ b/lib/docker/impl/model/plugin_config.ex @@ -0,0 +1,62 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfig do + @moduledoc """ + The config of a plugin. + """ + + @derive Jason.Encoder + defstruct [ + :DockerVersion, + :Description, + :Documentation, + :Interface, + :Entrypoint, + :WorkDir, + :User, + :Network, + :Linux, + :PropagatedMount, + :IpcHost, + :PidHost, + :Mounts, + :Env, + :Args, + :rootfs + ] + + @type t :: %__MODULE__{ + :DockerVersion => String.t | nil, + :Description => String.t, + :Documentation => String.t, + :Interface => DockerEngineAPI.Model.PluginConfigInterface.t, + :Entrypoint => [String.t], + :WorkDir => String.t, + :User => DockerEngineAPI.Model.PluginConfigUser.t | nil, + :Network => DockerEngineAPI.Model.PluginConfigNetwork.t, + :Linux => DockerEngineAPI.Model.PluginConfigLinux.t, + :PropagatedMount => String.t, + :IpcHost => boolean(), + :PidHost => boolean(), + :Mounts => [DockerEngineAPI.Model.PluginMount.t], + :Env => [DockerEngineAPI.Model.PluginEnv.t], + :Args => DockerEngineAPI.Model.PluginConfigArgs.t, + :rootfs => DockerEngineAPI.Model.PluginConfigRootfs.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Interface, :struct, DockerEngineAPI.Model.PluginConfigInterface) + |> Deserializer.deserialize(:User, :struct, DockerEngineAPI.Model.PluginConfigUser) + |> Deserializer.deserialize(:Network, :struct, DockerEngineAPI.Model.PluginConfigNetwork) + |> Deserializer.deserialize(:Linux, :struct, DockerEngineAPI.Model.PluginConfigLinux) + |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.PluginMount) + |> Deserializer.deserialize(:Env, :list, DockerEngineAPI.Model.PluginEnv) + |> Deserializer.deserialize(:Args, :struct, DockerEngineAPI.Model.PluginConfigArgs) + |> Deserializer.deserialize(:rootfs, :struct, DockerEngineAPI.Model.PluginConfigRootfs) + end +end + diff --git a/lib/docker/impl/model/plugin_config_args.ex b/lib/docker/impl/model/plugin_config_args.ex new file mode 100644 index 0000000..c7dd9e8 --- /dev/null +++ b/lib/docker/impl/model/plugin_config_args.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfigArgs do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Description, + :Settable, + :Value + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Description => String.t, + :Settable => [String.t], + :Value => [String.t] + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_config_interface.ex b/lib/docker/impl/model/plugin_config_interface.ex new file mode 100644 index 0000000..d7b184c --- /dev/null +++ b/lib/docker/impl/model/plugin_config_interface.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfigInterface do + @moduledoc """ + The interface between Docker and the plugin + """ + + @derive Jason.Encoder + defstruct [ + :Types, + :Socket, + :ProtocolScheme + ] + + @type t :: %__MODULE__{ + :Types => [DockerEngineAPI.Model.PluginInterfaceType.t], + :Socket => String.t, + :ProtocolScheme => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Types, :list, DockerEngineAPI.Model.PluginInterfaceType) + end +end + diff --git a/lib/docker/impl/model/plugin_config_linux.ex b/lib/docker/impl/model/plugin_config_linux.ex new file mode 100644 index 0000000..c124b70 --- /dev/null +++ b/lib/docker/impl/model/plugin_config_linux.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfigLinux do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Capabilities, + :AllowAllDevices, + :Devices + ] + + @type t :: %__MODULE__{ + :Capabilities => [String.t], + :AllowAllDevices => boolean(), + :Devices => [DockerEngineAPI.Model.PluginDevice.t] + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.PluginDevice) + end +end + diff --git a/lib/docker/impl/model/plugin_config_network.ex b/lib/docker/impl/model/plugin_config_network.ex new file mode 100644 index 0000000..182042d --- /dev/null +++ b/lib/docker/impl/model/plugin_config_network.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfigNetwork do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Type + ] + + @type t :: %__MODULE__{ + :Type => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_config_rootfs.ex b/lib/docker/impl/model/plugin_config_rootfs.ex new file mode 100644 index 0000000..ccca389 --- /dev/null +++ b/lib/docker/impl/model/plugin_config_rootfs.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfigRootfs do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :type, + :diff_ids + ] + + @type t :: %__MODULE__{ + :type => String.t | nil, + :diff_ids => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_config_user.ex b/lib/docker/impl/model/plugin_config_user.ex new file mode 100644 index 0000000..fbc247b --- /dev/null +++ b/lib/docker/impl/model/plugin_config_user.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginConfigUser do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :UID, + :GID + ] + + @type t :: %__MODULE__{ + :UID => integer() | nil, + :GID => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_device.ex b/lib/docker/impl/model/plugin_device.ex new file mode 100644 index 0000000..3c27fda --- /dev/null +++ b/lib/docker/impl/model/plugin_device.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginDevice do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Description, + :Settable, + :Path + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Description => String.t, + :Settable => [String.t], + :Path => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_env.ex b/lib/docker/impl/model/plugin_env.ex new file mode 100644 index 0000000..87230dd --- /dev/null +++ b/lib/docker/impl/model/plugin_env.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginEnv do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Description, + :Settable, + :Value + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Description => String.t, + :Settable => [String.t], + :Value => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_interface_type.ex b/lib/docker/impl/model/plugin_interface_type.ex new file mode 100644 index 0000000..8cc6ae9 --- /dev/null +++ b/lib/docker/impl/model/plugin_interface_type.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginInterfaceType do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Prefix, + :Capability, + :Version + ] + + @type t :: %__MODULE__{ + :Prefix => String.t, + :Capability => String.t, + :Version => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_mount.ex b/lib/docker/impl/model/plugin_mount.ex new file mode 100644 index 0000000..51f42e3 --- /dev/null +++ b/lib/docker/impl/model/plugin_mount.ex @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginMount do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Description, + :Settable, + :Source, + :Destination, + :Type, + :Options + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Description => String.t, + :Settable => [String.t], + :Source => String.t, + :Destination => String.t, + :Type => String.t, + :Options => [String.t] + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_privilege.ex b/lib/docker/impl/model/plugin_privilege.ex new file mode 100644 index 0000000..33ab2a8 --- /dev/null +++ b/lib/docker/impl/model/plugin_privilege.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginPrivilege do + @moduledoc """ + Describes a permission the user has to accept upon installing the plugin. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Description, + :Value + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Description => String.t | nil, + :Value => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/plugin_settings.ex b/lib/docker/impl/model/plugin_settings.ex new file mode 100644 index 0000000..51bb50a --- /dev/null +++ b/lib/docker/impl/model/plugin_settings.ex @@ -0,0 +1,32 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginSettings do + @moduledoc """ + Settings that can be modified by users. + """ + + @derive Jason.Encoder + defstruct [ + :Mounts, + :Env, + :Args, + :Devices + ] + + @type t :: %__MODULE__{ + :Mounts => [DockerEngineAPI.Model.PluginMount.t], + :Env => [String.t], + :Args => [String.t], + :Devices => [DockerEngineAPI.Model.PluginDevice.t] + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.PluginMount) + |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.PluginDevice) + end +end + diff --git a/lib/docker/impl/model/plugins_info.ex b/lib/docker/impl/model/plugins_info.ex new file mode 100644 index 0000000..f9aa252 --- /dev/null +++ b/lib/docker/impl/model/plugins_info.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PluginsInfo do + @moduledoc """ + Available plugins per type.


> **Note**: Only unmanaged (V1) plugins are included in this list. > V1 plugins are \"lazily\" loaded, and are not returned in this list > if there is no resource using the plugin. + """ + + @derive Jason.Encoder + defstruct [ + :Volume, + :Network, + :Authorization, + :Log + ] + + @type t :: %__MODULE__{ + :Volume => [String.t] | nil, + :Network => [String.t] | nil, + :Authorization => [String.t] | nil, + :Log => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/port.ex b/lib/docker/impl/model/port.ex new file mode 100644 index 0000000..cf10f39 --- /dev/null +++ b/lib/docker/impl/model/port.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Port do + @moduledoc """ + An open port on a container + """ + + @derive Jason.Encoder + defstruct [ + :IP, + :PrivatePort, + :PublicPort, + :Type + ] + + @type t :: %__MODULE__{ + :IP => String.t | nil, + :PrivatePort => integer(), + :PublicPort => integer() | nil, + :Type => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/port_binding.ex b/lib/docker/impl/model/port_binding.ex new file mode 100644 index 0000000..957026f --- /dev/null +++ b/lib/docker/impl/model/port_binding.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PortBinding do + @moduledoc """ + PortBinding represents a binding between a host IP address and a host port. + """ + + @derive Jason.Encoder + defstruct [ + :HostIp, + :HostPort + ] + + @type t :: %__MODULE__{ + :HostIp => String.t | nil, + :HostPort => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/process_config.ex b/lib/docker/impl/model/process_config.ex new file mode 100644 index 0000000..a4386f1 --- /dev/null +++ b/lib/docker/impl/model/process_config.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ProcessConfig do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :privileged, + :user, + :tty, + :entrypoint, + :arguments + ] + + @type t :: %__MODULE__{ + :privileged => boolean() | nil, + :user => String.t | nil, + :tty => boolean() | nil, + :entrypoint => String.t | nil, + :arguments => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/progress_detail.ex b/lib/docker/impl/model/progress_detail.ex new file mode 100644 index 0000000..997d29f --- /dev/null +++ b/lib/docker/impl/model/progress_detail.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ProgressDetail do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :current, + :total + ] + + @type t :: %__MODULE__{ + :current => integer() | nil, + :total => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/push_image_info.ex b/lib/docker/impl/model/push_image_info.ex new file mode 100644 index 0000000..6177709 --- /dev/null +++ b/lib/docker/impl/model/push_image_info.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.PushImageInfo do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :error, + :status, + :progress, + :progressDetail + ] + + @type t :: %__MODULE__{ + :error => String.t | nil, + :status => String.t | nil, + :progress => String.t | nil, + :progressDetail => DockerEngineAPI.Model.ProgressDetail.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:progressDetail, :struct, DockerEngineAPI.Model.ProgressDetail) + end +end + diff --git a/lib/docker/impl/model/reachability.ex b/lib/docker/impl/model/reachability.ex new file mode 100644 index 0000000..077c70d --- /dev/null +++ b/lib/docker/impl/model/reachability.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Reachability do + @moduledoc """ + Reachability represents the reachability of a node. + """ + + @derive Jason.Encoder + defstruct [ + + ] + + @type t :: %__MODULE__{ + + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/registry_service_config.ex b/lib/docker/impl/model/registry_service_config.ex new file mode 100644 index 0000000..ced801d --- /dev/null +++ b/lib/docker/impl/model/registry_service_config.ex @@ -0,0 +1,33 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.RegistryServiceConfig do + @moduledoc """ + RegistryServiceConfig stores daemon registry services configuration. + """ + + @derive Jason.Encoder + defstruct [ + :AllowNondistributableArtifactsCIDRs, + :AllowNondistributableArtifactsHostnames, + :InsecureRegistryCIDRs, + :IndexConfigs, + :Mirrors + ] + + @type t :: %__MODULE__{ + :AllowNondistributableArtifactsCIDRs => [String.t] | nil, + :AllowNondistributableArtifactsHostnames => [String.t] | nil, + :InsecureRegistryCIDRs => [String.t] | nil, + :IndexConfigs => %{optional(String.t) => DockerEngineAPI.Model.IndexInfo.t} | nil, + :Mirrors => [String.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:IndexConfigs, :map, DockerEngineAPI.Model.IndexInfo) + end +end + diff --git a/lib/docker/impl/model/resource_object.ex b/lib/docker/impl/model/resource_object.ex new file mode 100644 index 0000000..d5432a4 --- /dev/null +++ b/lib/docker/impl/model/resource_object.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ResourceObject do + @moduledoc """ + An object describing the resources which can be advertised by a node and requested by a task. + """ + + @derive Jason.Encoder + defstruct [ + :NanoCPUs, + :MemoryBytes, + :GenericResources + ] + + @type t :: %__MODULE__{ + :NanoCPUs => integer() | nil, + :MemoryBytes => integer() | nil, + :GenericResources => [DockerEngineAPI.Model.GenericResourcesInner.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:GenericResources, :list, DockerEngineAPI.Model.GenericResourcesInner) + end +end + diff --git a/lib/docker/impl/model/resources.ex b/lib/docker/impl/model/resources.ex new file mode 100644 index 0000000..3344596 --- /dev/null +++ b/lib/docker/impl/model/resources.ex @@ -0,0 +1,92 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Resources do + @moduledoc """ + A container's resources (cgroups config, ulimits, etc) + """ + + @derive Jason.Encoder + defstruct [ + :CpuShares, + :Memory, + :CgroupParent, + :BlkioWeight, + :BlkioWeightDevice, + :BlkioDeviceReadBps, + :BlkioDeviceWriteBps, + :BlkioDeviceReadIOps, + :BlkioDeviceWriteIOps, + :CpuPeriod, + :CpuQuota, + :CpuRealtimePeriod, + :CpuRealtimeRuntime, + :CpusetCpus, + :CpusetMems, + :Devices, + :DeviceCgroupRules, + :DeviceRequests, + :KernelMemoryTCP, + :MemoryReservation, + :MemorySwap, + :MemorySwappiness, + :NanoCpus, + :OomKillDisable, + :Init, + :PidsLimit, + :Ulimits, + :CpuCount, + :CpuPercent, + :IOMaximumIOps, + :IOMaximumBandwidth + ] + + @type t :: %__MODULE__{ + :CpuShares => integer() | nil, + :Memory => integer() | nil, + :CgroupParent => String.t | nil, + :BlkioWeight => integer() | nil, + :BlkioWeightDevice => [DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner.t] | nil, + :BlkioDeviceReadBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceWriteBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceReadIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :BlkioDeviceWriteIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, + :CpuPeriod => integer() | nil, + :CpuQuota => integer() | nil, + :CpuRealtimePeriod => integer() | nil, + :CpuRealtimeRuntime => integer() | nil, + :CpusetCpus => String.t | nil, + :CpusetMems => String.t | nil, + :Devices => [DockerEngineAPI.Model.DeviceMapping.t] | nil, + :DeviceCgroupRules => [String.t] | nil, + :DeviceRequests => [DockerEngineAPI.Model.DeviceRequest.t] | nil, + :KernelMemoryTCP => integer() | nil, + :MemoryReservation => integer() | nil, + :MemorySwap => integer() | nil, + :MemorySwappiness => integer() | nil, + :NanoCpus => integer() | nil, + :OomKillDisable => boolean() | nil, + :Init => boolean() | nil, + :PidsLimit => integer() | nil, + :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil, + :CpuCount => integer() | nil, + :CpuPercent => integer() | nil, + :IOMaximumIOps => integer() | nil, + :IOMaximumBandwidth => integer() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:BlkioWeightDevice, :list, DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner) + |> Deserializer.deserialize(:BlkioDeviceReadBps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceWriteBps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceReadIOps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:BlkioDeviceWriteIOps, :list, DockerEngineAPI.Model.ThrottleDevice) + |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.DeviceMapping) + |> Deserializer.deserialize(:DeviceRequests, :list, DockerEngineAPI.Model.DeviceRequest) + |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner) + end +end + diff --git a/lib/docker/impl/model/resources_blkio_weight_device_inner.ex b/lib/docker/impl/model/resources_blkio_weight_device_inner.ex new file mode 100644 index 0000000..93faf4b --- /dev/null +++ b/lib/docker/impl/model/resources_blkio_weight_device_inner.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Path, + :Weight + ] + + @type t :: %__MODULE__{ + :Path => String.t | nil, + :Weight => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/resources_ulimits_inner.ex b/lib/docker/impl/model/resources_ulimits_inner.ex new file mode 100644 index 0000000..7429007 --- /dev/null +++ b/lib/docker/impl/model/resources_ulimits_inner.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ResourcesUlimitsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Soft, + :Hard + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Soft => integer() | nil, + :Hard => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/restart_policy.ex b/lib/docker/impl/model/restart_policy.ex new file mode 100644 index 0000000..e33e275 --- /dev/null +++ b/lib/docker/impl/model/restart_policy.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.RestartPolicy do + @moduledoc """ + The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :MaximumRetryCount + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :MaximumRetryCount => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/runtime.ex b/lib/docker/impl/model/runtime.ex new file mode 100644 index 0000000..9ebd750 --- /dev/null +++ b/lib/docker/impl/model/runtime.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Runtime do + @moduledoc """ + Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux. + """ + + @derive Jason.Encoder + defstruct [ + :path, + :runtimeArgs + ] + + @type t :: %__MODULE__{ + :path => String.t | nil, + :runtimeArgs => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/secret.ex b/lib/docker/impl/model/secret.ex new file mode 100644 index 0000000..4d80dda --- /dev/null +++ b/lib/docker/impl/model/secret.ex @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Secret do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.SecretSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SecretSpec) + end +end + diff --git a/lib/docker/impl/model/secret_create_request.ex b/lib/docker/impl/model/secret_create_request.ex new file mode 100644 index 0000000..8b9f6fe --- /dev/null +++ b/lib/docker/impl/model/secret_create_request.ex @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SecretCreateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :Data, + :Driver, + :Templating + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Data => String.t | nil, + :Driver => DockerEngineAPI.Model.Driver.t | nil, + :Templating => DockerEngineAPI.Model.Driver.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Driver, :struct, DockerEngineAPI.Model.Driver) + |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) + end +end + diff --git a/lib/docker/impl/model/secret_spec.ex b/lib/docker/impl/model/secret_spec.ex new file mode 100644 index 0000000..5dad52a --- /dev/null +++ b/lib/docker/impl/model/secret_spec.ex @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SecretSpec do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :Data, + :Driver, + :Templating + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Data => String.t | nil, + :Driver => DockerEngineAPI.Model.Driver.t | nil, + :Templating => DockerEngineAPI.Model.Driver.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Driver, :struct, DockerEngineAPI.Model.Driver) + |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) + end +end + diff --git a/lib/docker/impl/model/service.ex b/lib/docker/impl/model/service.ex new file mode 100644 index 0000000..c93332d --- /dev/null +++ b/lib/docker/impl/model/service.ex @@ -0,0 +1,46 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Service do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec, + :Endpoint, + :UpdateStatus, + :ServiceStatus, + :JobStatus + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.ServiceSpec.t | nil, + :Endpoint => DockerEngineAPI.Model.ServiceEndpoint.t | nil, + :UpdateStatus => DockerEngineAPI.Model.ServiceUpdateStatus.t | nil, + :ServiceStatus => DockerEngineAPI.Model.ServiceServiceStatus.t | nil, + :JobStatus => DockerEngineAPI.Model.ServiceJobStatus.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ServiceSpec) + |> Deserializer.deserialize(:Endpoint, :struct, DockerEngineAPI.Model.ServiceEndpoint) + |> Deserializer.deserialize(:UpdateStatus, :struct, DockerEngineAPI.Model.ServiceUpdateStatus) + |> Deserializer.deserialize(:ServiceStatus, :struct, DockerEngineAPI.Model.ServiceServiceStatus) + |> Deserializer.deserialize(:JobStatus, :struct, DockerEngineAPI.Model.ServiceJobStatus) + end +end + diff --git a/lib/docker/impl/model/service_create_request.ex b/lib/docker/impl/model/service_create_request.ex new file mode 100644 index 0000000..61e84ba --- /dev/null +++ b/lib/docker/impl/model/service_create_request.ex @@ -0,0 +1,44 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceCreateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :TaskTemplate, + :Mode, + :UpdateConfig, + :RollbackConfig, + :Networks, + :EndpointSpec + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :TaskTemplate => DockerEngineAPI.Model.TaskSpec.t | nil, + :Mode => DockerEngineAPI.Model.ServiceSpecMode.t | nil, + :UpdateConfig => DockerEngineAPI.Model.ServiceSpecUpdateConfig.t | nil, + :RollbackConfig => DockerEngineAPI.Model.ServiceSpecRollbackConfig.t | nil, + :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, + :EndpointSpec => DockerEngineAPI.Model.EndpointSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:TaskTemplate, :struct, DockerEngineAPI.Model.TaskSpec) + |> Deserializer.deserialize(:Mode, :struct, DockerEngineAPI.Model.ServiceSpecMode) + |> Deserializer.deserialize(:UpdateConfig, :struct, DockerEngineAPI.Model.ServiceSpecUpdateConfig) + |> Deserializer.deserialize(:RollbackConfig, :struct, DockerEngineAPI.Model.ServiceSpecRollbackConfig) + |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) + |> Deserializer.deserialize(:EndpointSpec, :struct, DockerEngineAPI.Model.EndpointSpec) + end +end + diff --git a/lib/docker/impl/model/service_create_response.ex b/lib/docker/impl/model/service_create_response.ex new file mode 100644 index 0000000..5115045 --- /dev/null +++ b/lib/docker/impl/model/service_create_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceCreateResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Warning + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Warning => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_endpoint.ex b/lib/docker/impl/model/service_endpoint.ex new file mode 100644 index 0000000..00902b8 --- /dev/null +++ b/lib/docker/impl/model/service_endpoint.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceEndpoint do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Spec, + :Ports, + :VirtualIPs + ] + + @type t :: %__MODULE__{ + :Spec => DockerEngineAPI.Model.EndpointSpec.t | nil, + :Ports => [DockerEngineAPI.Model.EndpointPortConfig.t] | nil, + :VirtualIPs => [DockerEngineAPI.Model.ServiceEndpointVirtualIpsInner.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.EndpointSpec) + |> Deserializer.deserialize(:Ports, :list, DockerEngineAPI.Model.EndpointPortConfig) + |> Deserializer.deserialize(:VirtualIPs, :list, DockerEngineAPI.Model.ServiceEndpointVirtualIpsInner) + end +end + diff --git a/lib/docker/impl/model/service_endpoint_virtual_ips_inner.ex b/lib/docker/impl/model/service_endpoint_virtual_ips_inner.ex new file mode 100644 index 0000000..a05d7b8 --- /dev/null +++ b/lib/docker/impl/model/service_endpoint_virtual_ips_inner.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceEndpointVirtualIpsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :NetworkID, + :Addr + ] + + @type t :: %__MODULE__{ + :NetworkID => String.t | nil, + :Addr => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_job_status.ex b/lib/docker/impl/model/service_job_status.ex new file mode 100644 index 0000000..8e6d772 --- /dev/null +++ b/lib/docker/impl/model/service_job_status.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceJobStatus do + @moduledoc """ + The status of the service when it is in one of ReplicatedJob or GlobalJob modes. Absent on Replicated and Global mode services. The JobIteration is an ObjectVersion, but unlike the Service's version, does not need to be sent with an update request. + """ + + @derive Jason.Encoder + defstruct [ + :JobIteration, + :LastExecution + ] + + @type t :: %__MODULE__{ + :JobIteration => DockerEngineAPI.Model.ObjectVersion.t | nil, + :LastExecution => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:JobIteration, :struct, DockerEngineAPI.Model.ObjectVersion) + end +end + diff --git a/lib/docker/impl/model/service_service_status.ex b/lib/docker/impl/model/service_service_status.ex new file mode 100644 index 0000000..64ca5ce --- /dev/null +++ b/lib/docker/impl/model/service_service_status.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceServiceStatus do + @moduledoc """ + The status of the service's tasks. Provided only when requested as part of a ServiceList operation. + """ + + @derive Jason.Encoder + defstruct [ + :RunningTasks, + :DesiredTasks, + :CompletedTasks + ] + + @type t :: %__MODULE__{ + :RunningTasks => integer() | nil, + :DesiredTasks => integer() | nil, + :CompletedTasks => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_spec.ex b/lib/docker/impl/model/service_spec.ex new file mode 100644 index 0000000..9070bbd --- /dev/null +++ b/lib/docker/impl/model/service_spec.ex @@ -0,0 +1,44 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceSpec do + @moduledoc """ + User modifiable configuration for a service. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :TaskTemplate, + :Mode, + :UpdateConfig, + :RollbackConfig, + :Networks, + :EndpointSpec + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :TaskTemplate => DockerEngineAPI.Model.TaskSpec.t | nil, + :Mode => DockerEngineAPI.Model.ServiceSpecMode.t | nil, + :UpdateConfig => DockerEngineAPI.Model.ServiceSpecUpdateConfig.t | nil, + :RollbackConfig => DockerEngineAPI.Model.ServiceSpecRollbackConfig.t | nil, + :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, + :EndpointSpec => DockerEngineAPI.Model.EndpointSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:TaskTemplate, :struct, DockerEngineAPI.Model.TaskSpec) + |> Deserializer.deserialize(:Mode, :struct, DockerEngineAPI.Model.ServiceSpecMode) + |> Deserializer.deserialize(:UpdateConfig, :struct, DockerEngineAPI.Model.ServiceSpecUpdateConfig) + |> Deserializer.deserialize(:RollbackConfig, :struct, DockerEngineAPI.Model.ServiceSpecRollbackConfig) + |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) + |> Deserializer.deserialize(:EndpointSpec, :struct, DockerEngineAPI.Model.EndpointSpec) + end +end + diff --git a/lib/docker/impl/model/service_spec_mode.ex b/lib/docker/impl/model/service_spec_mode.ex new file mode 100644 index 0000000..7c77314 --- /dev/null +++ b/lib/docker/impl/model/service_spec_mode.ex @@ -0,0 +1,32 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceSpecMode do + @moduledoc """ + Scheduling mode for the service. + """ + + @derive Jason.Encoder + defstruct [ + :Replicated, + :Global, + :ReplicatedJob, + :GlobalJob + ] + + @type t :: %__MODULE__{ + :Replicated => DockerEngineAPI.Model.ServiceSpecModeReplicated.t | nil, + :Global => map() | nil, + :ReplicatedJob => DockerEngineAPI.Model.ServiceSpecModeReplicatedJob.t | nil, + :GlobalJob => map() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Replicated, :struct, DockerEngineAPI.Model.ServiceSpecModeReplicated) + |> Deserializer.deserialize(:ReplicatedJob, :struct, DockerEngineAPI.Model.ServiceSpecModeReplicatedJob) + end +end + diff --git a/lib/docker/impl/model/service_spec_mode_replicated.ex b/lib/docker/impl/model/service_spec_mode_replicated.ex new file mode 100644 index 0000000..2d03df5 --- /dev/null +++ b/lib/docker/impl/model/service_spec_mode_replicated.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceSpecModeReplicated do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Replicas + ] + + @type t :: %__MODULE__{ + :Replicas => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_spec_mode_replicated_job.ex b/lib/docker/impl/model/service_spec_mode_replicated_job.ex new file mode 100644 index 0000000..079aa78 --- /dev/null +++ b/lib/docker/impl/model/service_spec_mode_replicated_job.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceSpecModeReplicatedJob do + @moduledoc """ + The mode used for services with a finite number of tasks that run to a completed state. + """ + + @derive Jason.Encoder + defstruct [ + :MaxConcurrent, + :TotalCompletions + ] + + @type t :: %__MODULE__{ + :MaxConcurrent => integer() | nil, + :TotalCompletions => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_spec_rollback_config.ex b/lib/docker/impl/model/service_spec_rollback_config.ex new file mode 100644 index 0000000..582afb3 --- /dev/null +++ b/lib/docker/impl/model/service_spec_rollback_config.ex @@ -0,0 +1,32 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceSpecRollbackConfig do + @moduledoc """ + Specification for the rollback strategy of the service. + """ + + @derive Jason.Encoder + defstruct [ + :Parallelism, + :Delay, + :FailureAction, + :Monitor, + :MaxFailureRatio, + :Order + ] + + @type t :: %__MODULE__{ + :Parallelism => integer() | nil, + :Delay => integer() | nil, + :FailureAction => String.t | nil, + :Monitor => integer() | nil, + :MaxFailureRatio => float() | nil, + :Order => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_spec_update_config.ex b/lib/docker/impl/model/service_spec_update_config.ex new file mode 100644 index 0000000..5dc5e3b --- /dev/null +++ b/lib/docker/impl/model/service_spec_update_config.ex @@ -0,0 +1,32 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceSpecUpdateConfig do + @moduledoc """ + Specification for the update strategy of the service. + """ + + @derive Jason.Encoder + defstruct [ + :Parallelism, + :Delay, + :FailureAction, + :Monitor, + :MaxFailureRatio, + :Order + ] + + @type t :: %__MODULE__{ + :Parallelism => integer() | nil, + :Delay => integer() | nil, + :FailureAction => String.t | nil, + :Monitor => integer() | nil, + :MaxFailureRatio => float() | nil, + :Order => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_update_request.ex b/lib/docker/impl/model/service_update_request.ex new file mode 100644 index 0000000..d9e587d --- /dev/null +++ b/lib/docker/impl/model/service_update_request.ex @@ -0,0 +1,44 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceUpdateRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :TaskTemplate, + :Mode, + :UpdateConfig, + :RollbackConfig, + :Networks, + :EndpointSpec + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :TaskTemplate => DockerEngineAPI.Model.TaskSpec.t | nil, + :Mode => DockerEngineAPI.Model.ServiceSpecMode.t | nil, + :UpdateConfig => DockerEngineAPI.Model.ServiceSpecUpdateConfig.t | nil, + :RollbackConfig => DockerEngineAPI.Model.ServiceSpecRollbackConfig.t | nil, + :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, + :EndpointSpec => DockerEngineAPI.Model.EndpointSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:TaskTemplate, :struct, DockerEngineAPI.Model.TaskSpec) + |> Deserializer.deserialize(:Mode, :struct, DockerEngineAPI.Model.ServiceSpecMode) + |> Deserializer.deserialize(:UpdateConfig, :struct, DockerEngineAPI.Model.ServiceSpecUpdateConfig) + |> Deserializer.deserialize(:RollbackConfig, :struct, DockerEngineAPI.Model.ServiceSpecRollbackConfig) + |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) + |> Deserializer.deserialize(:EndpointSpec, :struct, DockerEngineAPI.Model.EndpointSpec) + end +end + diff --git a/lib/docker/impl/model/service_update_response.ex b/lib/docker/impl/model/service_update_response.ex new file mode 100644 index 0000000..d50ab20 --- /dev/null +++ b/lib/docker/impl/model/service_update_response.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceUpdateResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Warnings + ] + + @type t :: %__MODULE__{ + :Warnings => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/service_update_status.ex b/lib/docker/impl/model/service_update_status.ex new file mode 100644 index 0000000..ea65742 --- /dev/null +++ b/lib/docker/impl/model/service_update_status.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ServiceUpdateStatus do + @moduledoc """ + The status of a service update. + """ + + @derive Jason.Encoder + defstruct [ + :State, + :StartedAt, + :CompletedAt, + :Message + ] + + @type t :: %__MODULE__{ + :State => String.t | nil, + :StartedAt => String.t | nil, + :CompletedAt => String.t | nil, + :Message => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm.ex b/lib/docker/impl/model/swarm.ex new file mode 100644 index 0000000..3bb8c18 --- /dev/null +++ b/lib/docker/impl/model/swarm.ex @@ -0,0 +1,48 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Swarm do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Spec, + :TLSInfo, + :RootRotationInProgress, + :DataPathPort, + :DefaultAddrPool, + :SubnetSize, + :JoinTokens + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Spec => DockerEngineAPI.Model.SwarmSpec.t | nil, + :TLSInfo => DockerEngineAPI.Model.TlsInfo.t | nil, + :RootRotationInProgress => boolean() | nil, + :DataPathPort => integer() | nil, + :DefaultAddrPool => [String.t] | nil, + :SubnetSize => integer() | nil, + :JoinTokens => DockerEngineAPI.Model.JoinTokens.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SwarmSpec) + |> Deserializer.deserialize(:TLSInfo, :struct, DockerEngineAPI.Model.TlsInfo) + |> Deserializer.deserialize(:JoinTokens, :struct, DockerEngineAPI.Model.JoinTokens) + end +end + diff --git a/lib/docker/impl/model/swarm_info.ex b/lib/docker/impl/model/swarm_info.ex new file mode 100644 index 0000000..0c2faa8 --- /dev/null +++ b/lib/docker/impl/model/swarm_info.ex @@ -0,0 +1,43 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmInfo do + @moduledoc """ + Represents generic information about swarm. + """ + + @derive Jason.Encoder + defstruct [ + :NodeID, + :NodeAddr, + :LocalNodeState, + :ControlAvailable, + :Error, + :RemoteManagers, + :Nodes, + :Managers, + :Cluster + ] + + @type t :: %__MODULE__{ + :NodeID => String.t | nil, + :NodeAddr => String.t | nil, + :LocalNodeState => DockerEngineAPI.Model.LocalNodeState.t | nil, + :ControlAvailable => boolean() | nil, + :Error => String.t | nil, + :RemoteManagers => [DockerEngineAPI.Model.PeerNode.t] | nil, + :Nodes => integer() | nil, + :Managers => integer() | nil, + :Cluster => DockerEngineAPI.Model.ClusterInfo.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:LocalNodeState, :struct, DockerEngineAPI.Model.LocalNodeState) + |> Deserializer.deserialize(:RemoteManagers, :list, DockerEngineAPI.Model.PeerNode) + |> Deserializer.deserialize(:Cluster, :struct, DockerEngineAPI.Model.ClusterInfo) + end +end + diff --git a/lib/docker/impl/model/swarm_init_request.ex b/lib/docker/impl/model/swarm_init_request.ex new file mode 100644 index 0000000..15ec597 --- /dev/null +++ b/lib/docker/impl/model/swarm_init_request.ex @@ -0,0 +1,39 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmInitRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ListenAddr, + :AdvertiseAddr, + :DataPathAddr, + :DataPathPort, + :DefaultAddrPool, + :ForceNewCluster, + :SubnetSize, + :Spec + ] + + @type t :: %__MODULE__{ + :ListenAddr => String.t | nil, + :AdvertiseAddr => String.t | nil, + :DataPathAddr => String.t | nil, + :DataPathPort => integer() | nil, + :DefaultAddrPool => [String.t] | nil, + :ForceNewCluster => boolean() | nil, + :SubnetSize => integer() | nil, + :Spec => DockerEngineAPI.Model.SwarmSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SwarmSpec) + end +end + diff --git a/lib/docker/impl/model/swarm_join_request.ex b/lib/docker/impl/model/swarm_join_request.ex new file mode 100644 index 0000000..965c0b7 --- /dev/null +++ b/lib/docker/impl/model/swarm_join_request.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmJoinRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ListenAddr, + :AdvertiseAddr, + :DataPathAddr, + :RemoteAddrs, + :JoinToken + ] + + @type t :: %__MODULE__{ + :ListenAddr => String.t | nil, + :AdvertiseAddr => String.t | nil, + :DataPathAddr => String.t | nil, + :RemoteAddrs => [String.t] | nil, + :JoinToken => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_spec.ex b/lib/docker/impl/model/swarm_spec.ex new file mode 100644 index 0000000..35cae35 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec.ex @@ -0,0 +1,44 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpec do + @moduledoc """ + User modifiable swarm configuration. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Labels, + :Orchestration, + :Raft, + :Dispatcher, + :CAConfig, + :EncryptionConfig, + :TaskDefaults + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Orchestration => DockerEngineAPI.Model.SwarmSpecOrchestration.t | nil, + :Raft => DockerEngineAPI.Model.SwarmSpecRaft.t | nil, + :Dispatcher => DockerEngineAPI.Model.SwarmSpecDispatcher.t | nil, + :CAConfig => DockerEngineAPI.Model.SwarmSpecCaConfig.t | nil, + :EncryptionConfig => DockerEngineAPI.Model.SwarmSpecEncryptionConfig.t | nil, + :TaskDefaults => DockerEngineAPI.Model.SwarmSpecTaskDefaults.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Orchestration, :struct, DockerEngineAPI.Model.SwarmSpecOrchestration) + |> Deserializer.deserialize(:Raft, :struct, DockerEngineAPI.Model.SwarmSpecRaft) + |> Deserializer.deserialize(:Dispatcher, :struct, DockerEngineAPI.Model.SwarmSpecDispatcher) + |> Deserializer.deserialize(:CAConfig, :struct, DockerEngineAPI.Model.SwarmSpecCaConfig) + |> Deserializer.deserialize(:EncryptionConfig, :struct, DockerEngineAPI.Model.SwarmSpecEncryptionConfig) + |> Deserializer.deserialize(:TaskDefaults, :struct, DockerEngineAPI.Model.SwarmSpecTaskDefaults) + end +end + diff --git a/lib/docker/impl/model/swarm_spec_ca_config.ex b/lib/docker/impl/model/swarm_spec_ca_config.ex new file mode 100644 index 0000000..cfc4535 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_ca_config.ex @@ -0,0 +1,33 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecCaConfig do + @moduledoc """ + CA configuration. + """ + + @derive Jason.Encoder + defstruct [ + :NodeCertExpiry, + :ExternalCAs, + :SigningCACert, + :SigningCAKey, + :ForceRotate + ] + + @type t :: %__MODULE__{ + :NodeCertExpiry => integer() | nil, + :ExternalCAs => [DockerEngineAPI.Model.SwarmSpecCaConfigExternalCasInner.t] | nil, + :SigningCACert => String.t | nil, + :SigningCAKey => String.t | nil, + :ForceRotate => integer() | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:ExternalCAs, :list, DockerEngineAPI.Model.SwarmSpecCaConfigExternalCasInner) + end +end + diff --git a/lib/docker/impl/model/swarm_spec_ca_config_external_cas_inner.ex b/lib/docker/impl/model/swarm_spec_ca_config_external_cas_inner.ex new file mode 100644 index 0000000..6cea405 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_ca_config_external_cas_inner.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecCaConfigExternalCasInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Protocol, + :URL, + :Options, + :CACert + ] + + @type t :: %__MODULE__{ + :Protocol => String.t | nil, + :URL => String.t | nil, + :Options => %{optional(String.t) => String.t} | nil, + :CACert => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_spec_dispatcher.ex b/lib/docker/impl/model/swarm_spec_dispatcher.ex new file mode 100644 index 0000000..4fd90b1 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_dispatcher.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecDispatcher do + @moduledoc """ + Dispatcher configuration. + """ + + @derive Jason.Encoder + defstruct [ + :HeartbeatPeriod + ] + + @type t :: %__MODULE__{ + :HeartbeatPeriod => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_spec_encryption_config.ex b/lib/docker/impl/model/swarm_spec_encryption_config.ex new file mode 100644 index 0000000..7ddd9c1 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_encryption_config.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecEncryptionConfig do + @moduledoc """ + Parameters related to encryption-at-rest. + """ + + @derive Jason.Encoder + defstruct [ + :AutoLockManagers + ] + + @type t :: %__MODULE__{ + :AutoLockManagers => boolean() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_spec_orchestration.ex b/lib/docker/impl/model/swarm_spec_orchestration.ex new file mode 100644 index 0000000..6412690 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_orchestration.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecOrchestration do + @moduledoc """ + Orchestration configuration. + """ + + @derive Jason.Encoder + defstruct [ + :TaskHistoryRetentionLimit + ] + + @type t :: %__MODULE__{ + :TaskHistoryRetentionLimit => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_spec_raft.ex b/lib/docker/impl/model/swarm_spec_raft.ex new file mode 100644 index 0000000..0fcc431 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_raft.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecRaft do + @moduledoc """ + Raft configuration. + """ + + @derive Jason.Encoder + defstruct [ + :SnapshotInterval, + :KeepOldSnapshots, + :LogEntriesForSlowFollowers, + :ElectionTick, + :HeartbeatTick + ] + + @type t :: %__MODULE__{ + :SnapshotInterval => integer() | nil, + :KeepOldSnapshots => integer() | nil, + :LogEntriesForSlowFollowers => integer() | nil, + :ElectionTick => integer() | nil, + :HeartbeatTick => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_spec_task_defaults.ex b/lib/docker/impl/model/swarm_spec_task_defaults.ex new file mode 100644 index 0000000..c5b25c5 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_task_defaults.ex @@ -0,0 +1,25 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecTaskDefaults do + @moduledoc """ + Defaults for creating tasks in this cluster. + """ + + @derive Jason.Encoder + defstruct [ + :LogDriver + ] + + @type t :: %__MODULE__{ + :LogDriver => DockerEngineAPI.Model.SwarmSpecTaskDefaultsLogDriver.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:LogDriver, :struct, DockerEngineAPI.Model.SwarmSpecTaskDefaultsLogDriver) + end +end + diff --git a/lib/docker/impl/model/swarm_spec_task_defaults_log_driver.ex b/lib/docker/impl/model/swarm_spec_task_defaults_log_driver.ex new file mode 100644 index 0000000..ae9b7c6 --- /dev/null +++ b/lib/docker/impl/model/swarm_spec_task_defaults_log_driver.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmSpecTaskDefaultsLogDriver do + @moduledoc """ + The log driver to use for tasks created in the orchestrator if unspecified by a service. Updating this value only affects new tasks. Existing tasks continue to use their previously configured log driver until recreated. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Options + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Options => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/swarm_unlock_request.ex b/lib/docker/impl/model/swarm_unlock_request.ex new file mode 100644 index 0000000..7dfaeac --- /dev/null +++ b/lib/docker/impl/model/swarm_unlock_request.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SwarmUnlockRequest do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :UnlockKey + ] + + @type t :: %__MODULE__{ + :UnlockKey => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/system_auth_response.ex b/lib/docker/impl/model/system_auth_response.ex new file mode 100644 index 0000000..6817b00 --- /dev/null +++ b/lib/docker/impl/model/system_auth_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemAuthResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Status, + :IdentityToken + ] + + @type t :: %__MODULE__{ + :Status => String.t, + :IdentityToken => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/system_data_usage_response.ex b/lib/docker/impl/model/system_data_usage_response.ex new file mode 100644 index 0000000..96660ef --- /dev/null +++ b/lib/docker/impl/model/system_data_usage_response.ex @@ -0,0 +1,36 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemDataUsageResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :LayersSize, + :Images, + :Containers, + :Volumes, + :BuildCache + ] + + @type t :: %__MODULE__{ + :LayersSize => integer() | nil, + :Images => [DockerEngineAPI.Model.ImageSummary.t] | nil, + :Containers => [DockerEngineAPI.Model.ContainerSummary.t] | nil, + :Volumes => [DockerEngineAPI.Model.Volume.t] | nil, + :BuildCache => [DockerEngineAPI.Model.BuildCache.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Images, :list, DockerEngineAPI.Model.ImageSummary) + |> Deserializer.deserialize(:Containers, :list, DockerEngineAPI.Model.ContainerSummary) + |> Deserializer.deserialize(:Volumes, :list, DockerEngineAPI.Model.Volume) + |> Deserializer.deserialize(:BuildCache, :list, DockerEngineAPI.Model.BuildCache) + end +end + diff --git a/lib/docker/impl/model/system_info.ex b/lib/docker/impl/model/system_info.ex new file mode 100644 index 0000000..971cf54 --- /dev/null +++ b/lib/docker/impl/model/system_info.ex @@ -0,0 +1,151 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemInfo do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Containers, + :ContainersRunning, + :ContainersPaused, + :ContainersStopped, + :Images, + :Driver, + :DriverStatus, + :DockerRootDir, + :Plugins, + :MemoryLimit, + :SwapLimit, + :KernelMemoryTCP, + :CpuCfsPeriod, + :CpuCfsQuota, + :CPUShares, + :CPUSet, + :PidsLimit, + :OomKillDisable, + :IPv4Forwarding, + :BridgeNfIptables, + :BridgeNfIp6tables, + :Debug, + :NFd, + :NGoroutines, + :SystemTime, + :LoggingDriver, + :CgroupDriver, + :CgroupVersion, + :NEventsListener, + :KernelVersion, + :OperatingSystem, + :OSVersion, + :OSType, + :Architecture, + :NCPU, + :MemTotal, + :IndexServerAddress, + :RegistryConfig, + :GenericResources, + :HttpProxy, + :HttpsProxy, + :NoProxy, + :Name, + :Labels, + :ExperimentalBuild, + :ServerVersion, + :Runtimes, + :DefaultRuntime, + :Swarm, + :LiveRestoreEnabled, + :Isolation, + :InitBinary, + :ContainerdCommit, + :RuncCommit, + :InitCommit, + :SecurityOptions, + :ProductLicense, + :DefaultAddressPools, + :Warnings + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Containers => integer() | nil, + :ContainersRunning => integer() | nil, + :ContainersPaused => integer() | nil, + :ContainersStopped => integer() | nil, + :Images => integer() | nil, + :Driver => String.t | nil, + :DriverStatus => [[String.t]] | nil, + :DockerRootDir => String.t | nil, + :Plugins => DockerEngineAPI.Model.PluginsInfo.t | nil, + :MemoryLimit => boolean() | nil, + :SwapLimit => boolean() | nil, + :KernelMemoryTCP => boolean() | nil, + :CpuCfsPeriod => boolean() | nil, + :CpuCfsQuota => boolean() | nil, + :CPUShares => boolean() | nil, + :CPUSet => boolean() | nil, + :PidsLimit => boolean() | nil, + :OomKillDisable => boolean() | nil, + :IPv4Forwarding => boolean() | nil, + :BridgeNfIptables => boolean() | nil, + :BridgeNfIp6tables => boolean() | nil, + :Debug => boolean() | nil, + :NFd => integer() | nil, + :NGoroutines => integer() | nil, + :SystemTime => String.t | nil, + :LoggingDriver => String.t | nil, + :CgroupDriver => String.t | nil, + :CgroupVersion => String.t | nil, + :NEventsListener => integer() | nil, + :KernelVersion => String.t | nil, + :OperatingSystem => String.t | nil, + :OSVersion => String.t | nil, + :OSType => String.t | nil, + :Architecture => String.t | nil, + :NCPU => integer() | nil, + :MemTotal => integer() | nil, + :IndexServerAddress => String.t | nil, + :RegistryConfig => DockerEngineAPI.Model.RegistryServiceConfig.t | nil, + :GenericResources => [DockerEngineAPI.Model.GenericResourcesInner.t] | nil, + :HttpProxy => String.t | nil, + :HttpsProxy => String.t | nil, + :NoProxy => String.t | nil, + :Name => String.t | nil, + :Labels => [String.t] | nil, + :ExperimentalBuild => boolean() | nil, + :ServerVersion => String.t | nil, + :Runtimes => %{optional(String.t) => DockerEngineAPI.Model.Runtime.t} | nil, + :DefaultRuntime => String.t | nil, + :Swarm => DockerEngineAPI.Model.SwarmInfo.t | nil, + :LiveRestoreEnabled => boolean() | nil, + :Isolation => String.t | nil, + :InitBinary => String.t | nil, + :ContainerdCommit => DockerEngineAPI.Model.Commit.t | nil, + :RuncCommit => DockerEngineAPI.Model.Commit.t | nil, + :InitCommit => DockerEngineAPI.Model.Commit.t | nil, + :SecurityOptions => [String.t] | nil, + :ProductLicense => String.t | nil, + :DefaultAddressPools => [DockerEngineAPI.Model.SystemInfoDefaultAddressPoolsInner.t] | nil, + :Warnings => [String.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Plugins, :struct, DockerEngineAPI.Model.PluginsInfo) + |> Deserializer.deserialize(:RegistryConfig, :struct, DockerEngineAPI.Model.RegistryServiceConfig) + |> Deserializer.deserialize(:GenericResources, :list, DockerEngineAPI.Model.GenericResourcesInner) + |> Deserializer.deserialize(:Runtimes, :map, DockerEngineAPI.Model.Runtime) + |> Deserializer.deserialize(:Swarm, :struct, DockerEngineAPI.Model.SwarmInfo) + |> Deserializer.deserialize(:ContainerdCommit, :struct, DockerEngineAPI.Model.Commit) + |> Deserializer.deserialize(:RuncCommit, :struct, DockerEngineAPI.Model.Commit) + |> Deserializer.deserialize(:InitCommit, :struct, DockerEngineAPI.Model.Commit) + |> Deserializer.deserialize(:DefaultAddressPools, :list, DockerEngineAPI.Model.SystemInfoDefaultAddressPoolsInner) + end +end + diff --git a/lib/docker/impl/model/system_info_default_address_pools_inner.ex b/lib/docker/impl/model/system_info_default_address_pools_inner.ex new file mode 100644 index 0000000..a97c68e --- /dev/null +++ b/lib/docker/impl/model/system_info_default_address_pools_inner.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemInfoDefaultAddressPoolsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Base, + :Size + ] + + @type t :: %__MODULE__{ + :Base => String.t | nil, + :Size => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/system_version.ex b/lib/docker/impl/model/system_version.ex new file mode 100644 index 0000000..256f49a --- /dev/null +++ b/lib/docker/impl/model/system_version.ex @@ -0,0 +1,48 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemVersion do + @moduledoc """ + Response of Engine API: GET \"/version\" + """ + + @derive Jason.Encoder + defstruct [ + :Platform, + :Components, + :Version, + :ApiVersion, + :MinAPIVersion, + :GitCommit, + :GoVersion, + :Os, + :Arch, + :KernelVersion, + :Experimental, + :BuildTime + ] + + @type t :: %__MODULE__{ + :Platform => DockerEngineAPI.Model.SystemVersionPlatform.t | nil, + :Components => [DockerEngineAPI.Model.SystemVersionComponentsInner.t] | nil, + :Version => String.t | nil, + :ApiVersion => String.t | nil, + :MinAPIVersion => String.t | nil, + :GitCommit => String.t | nil, + :GoVersion => String.t | nil, + :Os => String.t | nil, + :Arch => String.t | nil, + :KernelVersion => String.t | nil, + :Experimental => boolean() | nil, + :BuildTime => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Platform, :struct, DockerEngineAPI.Model.SystemVersionPlatform) + |> Deserializer.deserialize(:Components, :list, DockerEngineAPI.Model.SystemVersionComponentsInner) + end +end + diff --git a/lib/docker/impl/model/system_version_components_inner.ex b/lib/docker/impl/model/system_version_components_inner.ex new file mode 100644 index 0000000..55eb562 --- /dev/null +++ b/lib/docker/impl/model/system_version_components_inner.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemVersionComponentsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Version, + :Details + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Version => String.t, + :Details => map() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/system_version_platform.ex b/lib/docker/impl/model/system_version_platform.ex new file mode 100644 index 0000000..1a446a4 --- /dev/null +++ b/lib/docker/impl/model/system_version_platform.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.SystemVersionPlatform do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name + ] + + @type t :: %__MODULE__{ + :Name => String.t + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task.ex b/lib/docker/impl/model/task.ex new file mode 100644 index 0000000..400892c --- /dev/null +++ b/lib/docker/impl/model/task.ex @@ -0,0 +1,56 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Task do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ID, + :Version, + :CreatedAt, + :UpdatedAt, + :Name, + :Labels, + :Spec, + :ServiceID, + :Slot, + :NodeID, + :AssignedGenericResources, + :Status, + :DesiredState, + :JobIteration + ] + + @type t :: %__MODULE__{ + :ID => String.t | nil, + :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, + :CreatedAt => String.t | nil, + :UpdatedAt => String.t | nil, + :Name => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Spec => DockerEngineAPI.Model.TaskSpec.t | nil, + :ServiceID => String.t | nil, + :Slot => integer() | nil, + :NodeID => String.t | nil, + :AssignedGenericResources => [DockerEngineAPI.Model.GenericResourcesInner.t] | nil, + :Status => DockerEngineAPI.Model.TaskStatus.t | nil, + :DesiredState => DockerEngineAPI.Model.TaskState.t | nil, + :JobIteration => DockerEngineAPI.Model.ObjectVersion.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.TaskSpec) + |> Deserializer.deserialize(:AssignedGenericResources, :list, DockerEngineAPI.Model.GenericResourcesInner) + |> Deserializer.deserialize(:Status, :struct, DockerEngineAPI.Model.TaskStatus) + |> Deserializer.deserialize(:DesiredState, :struct, DockerEngineAPI.Model.TaskState) + |> Deserializer.deserialize(:JobIteration, :struct, DockerEngineAPI.Model.ObjectVersion) + end +end + diff --git a/lib/docker/impl/model/task_spec.ex b/lib/docker/impl/model/task_spec.ex new file mode 100644 index 0000000..1575bc4 --- /dev/null +++ b/lib/docker/impl/model/task_spec.ex @@ -0,0 +1,50 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpec do + @moduledoc """ + User modifiable task configuration. + """ + + @derive Jason.Encoder + defstruct [ + :PluginSpec, + :ContainerSpec, + :NetworkAttachmentSpec, + :Resources, + :RestartPolicy, + :Placement, + :ForceUpdate, + :Runtime, + :Networks, + :LogDriver + ] + + @type t :: %__MODULE__{ + :PluginSpec => DockerEngineAPI.Model.TaskSpecPluginSpec.t | nil, + :ContainerSpec => DockerEngineAPI.Model.TaskSpecContainerSpec.t | nil, + :NetworkAttachmentSpec => DockerEngineAPI.Model.TaskSpecNetworkAttachmentSpec.t | nil, + :Resources => DockerEngineAPI.Model.TaskSpecResources.t | nil, + :RestartPolicy => DockerEngineAPI.Model.TaskSpecRestartPolicy.t | nil, + :Placement => DockerEngineAPI.Model.TaskSpecPlacement.t | nil, + :ForceUpdate => integer() | nil, + :Runtime => String.t | nil, + :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, + :LogDriver => DockerEngineAPI.Model.TaskSpecLogDriver.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:PluginSpec, :struct, DockerEngineAPI.Model.TaskSpecPluginSpec) + |> Deserializer.deserialize(:ContainerSpec, :struct, DockerEngineAPI.Model.TaskSpecContainerSpec) + |> Deserializer.deserialize(:NetworkAttachmentSpec, :struct, DockerEngineAPI.Model.TaskSpecNetworkAttachmentSpec) + |> Deserializer.deserialize(:Resources, :struct, DockerEngineAPI.Model.TaskSpecResources) + |> Deserializer.deserialize(:RestartPolicy, :struct, DockerEngineAPI.Model.TaskSpecRestartPolicy) + |> Deserializer.deserialize(:Placement, :struct, DockerEngineAPI.Model.TaskSpecPlacement) + |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) + |> Deserializer.deserialize(:LogDriver, :struct, DockerEngineAPI.Model.TaskSpecLogDriver) + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec.ex b/lib/docker/impl/model/task_spec_container_spec.ex new file mode 100644 index 0000000..8f69ccc --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec.ex @@ -0,0 +1,83 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpec do + @moduledoc """ + Container spec for the service.


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. + """ + + @derive Jason.Encoder + defstruct [ + :Image, + :Labels, + :Command, + :Args, + :Hostname, + :Env, + :Dir, + :User, + :Groups, + :Privileges, + :TTY, + :OpenStdin, + :ReadOnly, + :Mounts, + :StopSignal, + :StopGracePeriod, + :HealthCheck, + :Hosts, + :DNSConfig, + :Secrets, + :Configs, + :Isolation, + :Init, + :Sysctls, + :CapabilityAdd, + :CapabilityDrop, + :Ulimits + ] + + @type t :: %__MODULE__{ + :Image => String.t | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :Command => [String.t] | nil, + :Args => [String.t] | nil, + :Hostname => String.t | nil, + :Env => [String.t] | nil, + :Dir => String.t | nil, + :User => String.t | nil, + :Groups => [String.t] | nil, + :Privileges => DockerEngineAPI.Model.TaskSpecContainerSpecPrivileges.t | nil, + :TTY => boolean() | nil, + :OpenStdin => boolean() | nil, + :ReadOnly => boolean() | nil, + :Mounts => [DockerEngineAPI.Model.Mount.t] | nil, + :StopSignal => String.t | nil, + :StopGracePeriod => integer() | nil, + :HealthCheck => DockerEngineAPI.Model.HealthConfig.t | nil, + :Hosts => [String.t] | nil, + :DNSConfig => DockerEngineAPI.Model.TaskSpecContainerSpecDnsConfig.t | nil, + :Secrets => [DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInner.t] | nil, + :Configs => [DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInner.t] | nil, + :Isolation => String.t | nil, + :Init => boolean() | nil, + :Sysctls => %{optional(String.t) => String.t} | nil, + :CapabilityAdd => [String.t] | nil, + :CapabilityDrop => [String.t] | nil, + :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Privileges, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecPrivileges) + |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.Mount) + |> Deserializer.deserialize(:HealthCheck, :struct, DockerEngineAPI.Model.HealthConfig) + |> Deserializer.deserialize(:DNSConfig, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecDnsConfig) + |> Deserializer.deserialize(:Secrets, :list, DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInner) + |> Deserializer.deserialize(:Configs, :list, DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInner) + |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner) + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_configs_inner.ex b/lib/docker/impl/model/task_spec_container_spec_configs_inner.ex new file mode 100644 index 0000000..42f249f --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_configs_inner.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :File, + :Runtime, + :ConfigID, + :ConfigName + ] + + @type t :: %__MODULE__{ + :File => DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInnerFile.t | nil, + :Runtime => map() | nil, + :ConfigID => String.t | nil, + :ConfigName => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:File, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInnerFile) + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_configs_inner_file.ex b/lib/docker/impl/model/task_spec_container_spec_configs_inner_file.ex new file mode 100644 index 0000000..f4bbd77 --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_configs_inner_file.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInnerFile do + @moduledoc """ + File represents a specific target that is backed by a file.


> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :UID, + :GID, + :Mode + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :UID => String.t | nil, + :GID => String.t | nil, + :Mode => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_dns_config.ex b/lib/docker/impl/model/task_spec_container_spec_dns_config.ex new file mode 100644 index 0000000..98cb57a --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_dns_config.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecDnsConfig do + @moduledoc """ + Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + """ + + @derive Jason.Encoder + defstruct [ + :Nameservers, + :Search, + :Options + ] + + @type t :: %__MODULE__{ + :Nameservers => [String.t] | nil, + :Search => [String.t] | nil, + :Options => [String.t] | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_privileges.ex b/lib/docker/impl/model/task_spec_container_spec_privileges.ex new file mode 100644 index 0000000..ca969b9 --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_privileges.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecPrivileges do + @moduledoc """ + Security options for the container + """ + + @derive Jason.Encoder + defstruct [ + :CredentialSpec, + :SELinuxContext + ] + + @type t :: %__MODULE__{ + :CredentialSpec => DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesCredentialSpec.t | nil, + :SELinuxContext => DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesSeLinuxContext.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:CredentialSpec, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesCredentialSpec) + |> Deserializer.deserialize(:SELinuxContext, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesSeLinuxContext) + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_privileges_credential_spec.ex b/lib/docker/impl/model/task_spec_container_spec_privileges_credential_spec.ex new file mode 100644 index 0000000..cb6aad9 --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_privileges_credential_spec.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesCredentialSpec do + @moduledoc """ + CredentialSpec for managed service account (Windows only) + """ + + @derive Jason.Encoder + defstruct [ + :Config, + :File, + :Registry + ] + + @type t :: %__MODULE__{ + :Config => String.t | nil, + :File => String.t | nil, + :Registry => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_privileges_se_linux_context.ex b/lib/docker/impl/model/task_spec_container_spec_privileges_se_linux_context.ex new file mode 100644 index 0000000..b3d4197 --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_privileges_se_linux_context.ex @@ -0,0 +1,30 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesSeLinuxContext do + @moduledoc """ + SELinux labels of the container + """ + + @derive Jason.Encoder + defstruct [ + :Disable, + :User, + :Role, + :Type, + :Level + ] + + @type t :: %__MODULE__{ + :Disable => boolean() | nil, + :User => String.t | nil, + :Role => String.t | nil, + :Type => String.t | nil, + :Level => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_secrets_inner.ex b/lib/docker/impl/model/task_spec_container_spec_secrets_inner.ex new file mode 100644 index 0000000..a001ed4 --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_secrets_inner.ex @@ -0,0 +1,29 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :File, + :SecretID, + :SecretName + ] + + @type t :: %__MODULE__{ + :File => DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInnerFile.t | nil, + :SecretID => String.t | nil, + :SecretName => String.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:File, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInnerFile) + end +end + diff --git a/lib/docker/impl/model/task_spec_container_spec_secrets_inner_file.ex b/lib/docker/impl/model/task_spec_container_spec_secrets_inner_file.ex new file mode 100644 index 0000000..38ee031 --- /dev/null +++ b/lib/docker/impl/model/task_spec_container_spec_secrets_inner_file.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInnerFile do + @moduledoc """ + File represents a specific target that is backed by a file. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :UID, + :GID, + :Mode + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :UID => String.t | nil, + :GID => String.t | nil, + :Mode => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_log_driver.ex b/lib/docker/impl/model/task_spec_log_driver.ex new file mode 100644 index 0000000..52d6b31 --- /dev/null +++ b/lib/docker/impl/model/task_spec_log_driver.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecLogDriver do + @moduledoc """ + Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Options + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Options => %{optional(String.t) => String.t} | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_network_attachment_spec.ex b/lib/docker/impl/model/task_spec_network_attachment_spec.ex new file mode 100644 index 0000000..dd1dd85 --- /dev/null +++ b/lib/docker/impl/model/task_spec_network_attachment_spec.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecNetworkAttachmentSpec do + @moduledoc """ + Read-only spec type for non-swarm containers attached to swarm overlay networks.


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. + """ + + @derive Jason.Encoder + defstruct [ + :ContainerID + ] + + @type t :: %__MODULE__{ + :ContainerID => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_placement.ex b/lib/docker/impl/model/task_spec_placement.ex new file mode 100644 index 0000000..5a10e5f --- /dev/null +++ b/lib/docker/impl/model/task_spec_placement.ex @@ -0,0 +1,32 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecPlacement do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Constraints, + :Preferences, + :MaxReplicas, + :Platforms + ] + + @type t :: %__MODULE__{ + :Constraints => [String.t] | nil, + :Preferences => [DockerEngineAPI.Model.TaskSpecPlacementPreferencesInner.t] | nil, + :MaxReplicas => integer() | nil, + :Platforms => [DockerEngineAPI.Model.Platform.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Preferences, :list, DockerEngineAPI.Model.TaskSpecPlacementPreferencesInner) + |> Deserializer.deserialize(:Platforms, :list, DockerEngineAPI.Model.Platform) + end +end + diff --git a/lib/docker/impl/model/task_spec_placement_preferences_inner.ex b/lib/docker/impl/model/task_spec_placement_preferences_inner.ex new file mode 100644 index 0000000..d4bdee2 --- /dev/null +++ b/lib/docker/impl/model/task_spec_placement_preferences_inner.ex @@ -0,0 +1,25 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecPlacementPreferencesInner do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Spread + ] + + @type t :: %__MODULE__{ + :Spread => DockerEngineAPI.Model.TaskSpecPlacementPreferencesInnerSpread.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Spread, :struct, DockerEngineAPI.Model.TaskSpecPlacementPreferencesInnerSpread) + end +end + diff --git a/lib/docker/impl/model/task_spec_placement_preferences_inner_spread.ex b/lib/docker/impl/model/task_spec_placement_preferences_inner_spread.ex new file mode 100644 index 0000000..a163262 --- /dev/null +++ b/lib/docker/impl/model/task_spec_placement_preferences_inner_spread.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecPlacementPreferencesInnerSpread do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :SpreadDescriptor + ] + + @type t :: %__MODULE__{ + :SpreadDescriptor => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_spec_plugin_spec.ex b/lib/docker/impl/model/task_spec_plugin_spec.ex new file mode 100644 index 0000000..d0b5187 --- /dev/null +++ b/lib/docker/impl/model/task_spec_plugin_spec.ex @@ -0,0 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecPluginSpec do + @moduledoc """ + Plugin spec for the service. *(Experimental release only.)*


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Remote, + :Disabled, + :PluginPrivilege + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Remote => String.t | nil, + :Disabled => boolean() | nil, + :PluginPrivilege => [DockerEngineAPI.Model.PluginPrivilege.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:PluginPrivilege, :list, DockerEngineAPI.Model.PluginPrivilege) + end +end + diff --git a/lib/docker/impl/model/task_spec_resources.ex b/lib/docker/impl/model/task_spec_resources.ex new file mode 100644 index 0000000..d141b98 --- /dev/null +++ b/lib/docker/impl/model/task_spec_resources.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecResources do + @moduledoc """ + Resource requirements which apply to each individual container created as part of the service. + """ + + @derive Jason.Encoder + defstruct [ + :Limits, + :Reservations + ] + + @type t :: %__MODULE__{ + :Limits => DockerEngineAPI.Model.Limit.t | nil, + :Reservations => DockerEngineAPI.Model.ResourceObject.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Limits, :struct, DockerEngineAPI.Model.Limit) + |> Deserializer.deserialize(:Reservations, :struct, DockerEngineAPI.Model.ResourceObject) + end +end + diff --git a/lib/docker/impl/model/task_spec_restart_policy.ex b/lib/docker/impl/model/task_spec_restart_policy.ex new file mode 100644 index 0000000..4dac561 --- /dev/null +++ b/lib/docker/impl/model/task_spec_restart_policy.ex @@ -0,0 +1,28 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskSpecRestartPolicy do + @moduledoc """ + Specification for the restart policy which applies to containers created as part of this service. + """ + + @derive Jason.Encoder + defstruct [ + :Condition, + :Delay, + :MaxAttempts, + :Window + ] + + @type t :: %__MODULE__{ + :Condition => String.t | nil, + :Delay => integer() | nil, + :MaxAttempts => integer() | nil, + :Window => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_state.ex b/lib/docker/impl/model/task_state.ex new file mode 100644 index 0000000..2652726 --- /dev/null +++ b/lib/docker/impl/model/task_state.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskState do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + + ] + + @type t :: %__MODULE__{ + + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/task_status.ex b/lib/docker/impl/model/task_status.ex new file mode 100644 index 0000000..629b37d --- /dev/null +++ b/lib/docker/impl/model/task_status.ex @@ -0,0 +1,34 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskStatus do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Timestamp, + :State, + :Message, + :Err, + :ContainerStatus + ] + + @type t :: %__MODULE__{ + :Timestamp => String.t | nil, + :State => DockerEngineAPI.Model.TaskState.t | nil, + :Message => String.t | nil, + :Err => String.t | nil, + :ContainerStatus => DockerEngineAPI.Model.TaskStatusContainerStatus.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:State, :struct, DockerEngineAPI.Model.TaskState) + |> Deserializer.deserialize(:ContainerStatus, :struct, DockerEngineAPI.Model.TaskStatusContainerStatus) + end +end + diff --git a/lib/docker/impl/model/task_status_container_status.ex b/lib/docker/impl/model/task_status_container_status.ex new file mode 100644 index 0000000..7d1368a --- /dev/null +++ b/lib/docker/impl/model/task_status_container_status.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TaskStatusContainerStatus do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :ContainerID, + :PID, + :ExitCode + ] + + @type t :: %__MODULE__{ + :ContainerID => String.t | nil, + :PID => integer() | nil, + :ExitCode => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/throttle_device.ex b/lib/docker/impl/model/throttle_device.ex new file mode 100644 index 0000000..7d63813 --- /dev/null +++ b/lib/docker/impl/model/throttle_device.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.ThrottleDevice do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Path, + :Rate + ] + + @type t :: %__MODULE__{ + :Path => String.t | nil, + :Rate => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/tls_info.ex b/lib/docker/impl/model/tls_info.ex new file mode 100644 index 0000000..e5b9849 --- /dev/null +++ b/lib/docker/impl/model/tls_info.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.TlsInfo do + @moduledoc """ + Information about the issuer of leaf TLS certificates and the trusted root CA certificate. + """ + + @derive Jason.Encoder + defstruct [ + :TrustRoot, + :CertIssuerSubject, + :CertIssuerPublicKey + ] + + @type t :: %__MODULE__{ + :TrustRoot => String.t | nil, + :CertIssuerSubject => String.t | nil, + :CertIssuerPublicKey => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/unlock_key_response.ex b/lib/docker/impl/model/unlock_key_response.ex new file mode 100644 index 0000000..81012cf --- /dev/null +++ b/lib/docker/impl/model/unlock_key_response.ex @@ -0,0 +1,22 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.UnlockKeyResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :UnlockKey + ] + + @type t :: %__MODULE__{ + :UnlockKey => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/volume.ex b/lib/docker/impl/model/volume.ex new file mode 100644 index 0000000..461a544 --- /dev/null +++ b/lib/docker/impl/model/volume.ex @@ -0,0 +1,44 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.Volume do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Driver, + :Mountpoint, + :CreatedAt, + :Status, + :Labels, + :Scope, + :ClusterVolume, + :Options, + :UsageData + ] + + @type t :: %__MODULE__{ + :Name => String.t, + :Driver => String.t, + :Mountpoint => String.t, + :CreatedAt => String.t | nil, + :Status => %{optional(String.t) => map()} | nil, + :Labels => %{optional(String.t) => String.t}, + :Scope => String.t, + :ClusterVolume => DockerEngineAPI.Model.ClusterVolume.t | nil, + :Options => %{optional(String.t) => String.t}, + :UsageData => DockerEngineAPI.Model.VolumeUsageData.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:ClusterVolume, :struct, DockerEngineAPI.Model.ClusterVolume) + |> Deserializer.deserialize(:UsageData, :struct, DockerEngineAPI.Model.VolumeUsageData) + end +end + diff --git a/lib/docker/impl/model/volume_create_options.ex b/lib/docker/impl/model/volume_create_options.ex new file mode 100644 index 0000000..36c203c --- /dev/null +++ b/lib/docker/impl/model/volume_create_options.ex @@ -0,0 +1,33 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.VolumeCreateOptions do + @moduledoc """ + Volume configuration + """ + + @derive Jason.Encoder + defstruct [ + :Name, + :Driver, + :DriverOpts, + :Labels, + :ClusterVolumeSpec + ] + + @type t :: %__MODULE__{ + :Name => String.t | nil, + :Driver => String.t | nil, + :DriverOpts => %{optional(String.t) => String.t} | nil, + :Labels => %{optional(String.t) => String.t} | nil, + :ClusterVolumeSpec => DockerEngineAPI.Model.ClusterVolumeSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:ClusterVolumeSpec, :struct, DockerEngineAPI.Model.ClusterVolumeSpec) + end +end + diff --git a/lib/docker/impl/model/volume_list_response.ex b/lib/docker/impl/model/volume_list_response.ex new file mode 100644 index 0000000..9bee563 --- /dev/null +++ b/lib/docker/impl/model/volume_list_response.ex @@ -0,0 +1,27 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.VolumeListResponse do + @moduledoc """ + Volume list response + """ + + @derive Jason.Encoder + defstruct [ + :Volumes, + :Warnings + ] + + @type t :: %__MODULE__{ + :Volumes => [DockerEngineAPI.Model.Volume.t] | nil, + :Warnings => [String.t] | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Volumes, :list, DockerEngineAPI.Model.Volume) + end +end + diff --git a/lib/docker/impl/model/volume_prune_response.ex b/lib/docker/impl/model/volume_prune_response.ex new file mode 100644 index 0000000..c2dddf3 --- /dev/null +++ b/lib/docker/impl/model/volume_prune_response.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.VolumePruneResponse do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :VolumesDeleted, + :SpaceReclaimed + ] + + @type t :: %__MODULE__{ + :VolumesDeleted => [String.t] | nil, + :SpaceReclaimed => integer() | nil + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/model/volume_update_request.ex b/lib/docker/impl/model/volume_update_request.ex new file mode 100644 index 0000000..a0f97d6 --- /dev/null +++ b/lib/docker/impl/model/volume_update_request.ex @@ -0,0 +1,25 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.VolumeUpdateRequest do + @moduledoc """ + Volume configuration + """ + + @derive Jason.Encoder + defstruct [ + :Spec + ] + + @type t :: %__MODULE__{ + :Spec => DockerEngineAPI.Model.ClusterVolumeSpec.t | nil + } + + alias DockerEngineAPI.Deserializer + + def decode(value) do + value + |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ClusterVolumeSpec) + end +end + diff --git a/lib/docker/impl/model/volume_usage_data.ex b/lib/docker/impl/model/volume_usage_data.ex new file mode 100644 index 0000000..a5994fc --- /dev/null +++ b/lib/docker/impl/model/volume_usage_data.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.Model.VolumeUsageData do + @moduledoc """ + Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. + """ + + @derive Jason.Encoder + defstruct [ + :Size, + :RefCount + ] + + @type t :: %__MODULE__{ + :Size => integer(), + :RefCount => integer() + } + + def decode(value) do + value + end +end + diff --git a/lib/docker/impl/request_builder.ex b/lib/docker/impl/request_builder.ex new file mode 100644 index 0000000..23304fd --- /dev/null +++ b/lib/docker/impl/request_builder.ex @@ -0,0 +1,197 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule DockerEngineAPI.RequestBuilder do + @moduledoc """ + Helper functions for building Tesla requests + """ + + @doc """ + Specify the request `method` when building a request. + + Does not override the `method` if one has already been specified. + + ### Parameters + + - `request` (Map) - Collected request options + - `method` (atom) - Request method + + ### Returns + + Map + """ + @spec method(map(), atom()) :: map() + def method(request, method) do + Map.put_new(request, :method, method) + end + + @doc """ + Specify the request URL when building a request. + + Does not override the `url` if one has already been specified. + + ### Parameters + + - `request` (Map) - Collected request options + - `url` (String) - Request URL + + ### Returns + + Map + """ + @spec url(map(), String.t()) :: map() + def url(request, url) do + Map.put_new(request, :url, url) + end + + @doc """ + Add optional parameters to the request. + + ### Parameters + + - `request` (Map) - Collected request options + - `definitions` (Map) - Map of parameter name to parameter location. + - `options` (KeywordList) - The provided optional parameters + + ### Returns + + Map + """ + @spec add_optional_params(map(), %{optional(atom) => atom()}, keyword()) :: map() + def add_optional_params(request, _, []), do: request + + def add_optional_params(request, definitions, [{key, value} | tail]) do + case definitions do + %{^key => location} -> + request + |> add_param(location, key, value) + |> add_optional_params(definitions, tail) + + _ -> + add_optional_params(request, definitions, tail) + end + end + + @doc """ + Add non-optional parameters to the request. + + ### Parameters + + - `request` (Map) - Collected request options + - `location` (atom) - Where to put the parameter + - `key` (atom) - The name of the parameter + - `value` (any) - The value of the parameter + + ### Returns + + Map + """ + @spec add_param(map(), atom(), atom(), any()) :: map() + def add_param(request, :body, :body, value), do: Map.put(request, :body, value) + + def add_param(request, :body, key, value) do + request + |> Map.put_new_lazy(:body, &Tesla.Multipart.new/0) + |> Map.update!(:body, fn multipart -> + Tesla.Multipart.add_field( + multipart, + key, + Jason.encode!(value), + headers: [{:"Content-Type", "application/json"}] + ) + end) + end + + def add_param(request, :headers, key, value) do + headers = + request + |> Map.get(:headers, []) + |> List.keystore(key, 0, {key, value}) + + Map.put(request, :headers, headers) + end + + def add_param(request, :file, name, path) do + request + |> Map.put_new_lazy(:body, &Tesla.Multipart.new/0) + |> Map.update!(:body, &(Tesla.Multipart.add_file(&1, path, name: name))) + end + + def add_param(request, :form, name, value) do + Map.update(request, :body, %{name => value}, &(Map.put(&1, name, value))) + end + + def add_param(request, location, key, value) do + Map.update(request, location, [{key, value}], &(&1 ++ [{key, value}])) + end + + @doc """ + This function ensures that the `body` parameter is always set. + + When using Tesla with the `httpc` adapter (the default adapter), there is a + bug where POST, PATCH and PUT requests will fail if the body is empty. + + ### Parameters + + - `request` (Map) - Collected request options + + ### Returns + + Map + """ + @spec ensure_body(map()) :: map() + def ensure_body(%{body: nil} = request) do + %{request | body: ""} + end + + def ensure_body(request) do + Map.put_new(request, :body, "") + end + + @type status_code :: :default | 100..599 + @type response_mapping :: [{status_code, false | %{} | module()}] + + @doc """ + Evaluate the response from a Tesla request. + Decode the response for a Tesla request. + + ### Parameters + + - `result` (Tesla.Env.result()): The response from Tesla.request/2. + - `mapping` ([{http_status, struct}]): The mapping for status to struct for decoding. + + ### Returns + + - `{:ok, struct}` or `{:ok, Tesla.Env.t()}` on success + - `{:error, term}` on failure + """ + @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct()} | Tesla.Env.result() + def evaluate_response({:ok, %Tesla.Env{} = env}, mapping) do + resolve_mapping(env, mapping, nil) + end + + def evaluate_response({:error, _} = error, _), do: error + + defp resolve_mapping(%Tesla.Env{status: status} = env, [{mapping_status, struct} | _], _) + when status == mapping_status do + decode(env, struct) + end + + defp resolve_mapping(env, [{:default, struct} | tail], _), do: resolve_mapping(env, tail, struct) + + defp resolve_mapping(env, [_ | tail], struct), do: resolve_mapping(env, tail, struct) + + defp resolve_mapping(env, [], nil), do: {:error, env} + + defp resolve_mapping(env, [], struct), do: decode(env, struct) + + defp decode(%Tesla.Env{} = env, false), do: {:ok, env} + + defp decode(%Tesla.Env{body: body}, %{}) do + DockerEngineAPI.Deserializer.jason_decode(body) + end + + defp decode(%Tesla.Env{body: body}, module) do + DockerEngineAPI.Deserializer.jason_decode(body, module) + end +end diff --git a/mix.exs b/mix.exs index ac2be10..f139413 100644 --- a/mix.exs +++ b/mix.exs @@ -52,8 +52,9 @@ defmodule TestcontainersElixir.MixProject do {:elixir_uuid, "~> 1.2"}, {:dialyxir, "~> 1.3", only: [:dev], runtime: false}, {:ex_doc, "~> 0.30", only: :dev, runtime: false}, - # docker api - {:ex_docker_engine_api, "~> 1.43.2"}, + {:tesla, "~> 1.7"}, + {:jason, "~> 1.4"}, + {:hackney, "~> 1.20"}, # ecto module {:ecto_sql, "~> 3.3", optional: true}, {:ecto, "~> 3.3", optional: true}, diff --git a/mix.lock b/mix.lock index 2e9ddf2..ad71d0c 100644 --- a/mix.lock +++ b/mix.lock @@ -18,7 +18,6 @@ "ex_aws": {:hex, :ex_aws, "2.5.5", "5dc378eff99c3c46c917b7a96a75ad0d4c300ab7250df668d0819bcd18c0213d", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8 or ~> 3.0", [hex: :jsx, repo: "hexpm", optional: true]}, {:mime, "~> 1.2 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:req, "~> 0.3", [hex: :req, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ed7ee39c56012c56600e021953c6487ecce9c49320ec3b4655a15d785f221ca6"}, "ex_aws_s3": {:hex, :ex_aws_s3, "2.5.4", "87aaf4a2f24a48f516d7f5aaced9d128dd5d0f655c4431f9037a11a85c71109c", [:mix], [{:ex_aws, "~> 2.0", [hex: :ex_aws, repo: "hexpm", optional: false]}, {:sweet_xml, ">= 0.0.0", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "c06e7f68b33f7c0acba1361dbd951c79661a28f85aa2e0582990fccca4425355"}, "ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"}, - "ex_docker_engine_api": {:hex, :ex_docker_engine_api, "1.43.2", "011c7ace8f9db0d03664c0ad763886831462cb0244cd024ab9326463ec3ff283", [:mix], [{:hackney, "~> 1.20", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:tesla, "~> 1.7", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "f3884963ad742ee02cbf3277a75371569292ceee81df7f679a3021a3b64bf1ab"}, "exmqtt": {:git, "https://github.com/ryanwinchester/exmqtt.git", "b6da7d412b1e7fe8c78f5e8de1895c990e34ff67", [branch: "master"]}, "fs": {:hex, :fs, "8.6.1", "7c9c0d0211e8c520e4e9eda63b960605c2711839f47285e6166c332d973be8ea", [:rebar3], [], "hexpm", "61ea2bdaedae4e2024d0d25c63e44dccf65622d4402db4a2df12868d1546503f"}, "gen_state_machine": {:hex, :gen_state_machine, "3.0.0", "1e57f86a494e5c6b14137ebef26a7eb342b3b0070c7135f2d6768ed3f6b6cdff", [:mix], [], "hexpm", "0a59652574bebceb7309f6b749d2a41b45fdeda8dbb4da0791e355dd19f0ed15"}, From 2abf651a03454885cc469ee3a23a9e7123636e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Sun, 3 Nov 2024 21:42:11 +0100 Subject: [PATCH 2/4] move docker_engine_api outside lib folder --- {lib/docker/impl => docker_engine_api}/api/config.ex | 0 {lib/docker/impl => docker_engine_api}/api/container.ex | 0 {lib/docker/impl => docker_engine_api}/api/distribution.ex | 0 {lib/docker/impl => docker_engine_api}/api/exec.ex | 0 {lib/docker/impl => docker_engine_api}/api/image.ex | 0 {lib/docker/impl => docker_engine_api}/api/network.ex | 0 {lib/docker/impl => docker_engine_api}/api/node.ex | 0 {lib/docker/impl => docker_engine_api}/api/plugin.ex | 0 {lib/docker/impl => docker_engine_api}/api/secret.ex | 0 {lib/docker/impl => docker_engine_api}/api/service.ex | 0 {lib/docker/impl => docker_engine_api}/api/session.ex | 0 {lib/docker/impl => docker_engine_api}/api/swarm.ex | 0 {lib/docker/impl => docker_engine_api}/api/system.ex | 0 {lib/docker/impl => docker_engine_api}/api/task.ex | 0 {lib/docker/impl => docker_engine_api}/api/volume.ex | 0 {lib/docker/impl => docker_engine_api}/connection.ex | 0 {lib/docker/impl => docker_engine_api}/deserializer.ex | 0 {lib/docker/impl => docker_engine_api}/model/address.ex | 0 {lib/docker/impl => docker_engine_api}/model/auth_config.ex | 0 {lib/docker/impl => docker_engine_api}/model/build_cache.ex | 0 {lib/docker/impl => docker_engine_api}/model/build_info.ex | 0 .../impl => docker_engine_api}/model/build_prune_response.ex | 0 {lib/docker/impl => docker_engine_api}/model/change_type.ex | 0 {lib/docker/impl => docker_engine_api}/model/cluster_info.ex | 0 .../docker/impl => docker_engine_api}/model/cluster_volume.ex | 0 .../impl => docker_engine_api}/model/cluster_volume_info.ex | 0 .../model/cluster_volume_publish_status_inner.ex | 0 .../impl => docker_engine_api}/model/cluster_volume_spec.ex | 0 .../model/cluster_volume_spec_access_mode.ex | 0 ...ster_volume_spec_access_mode_accessibility_requirements.ex | 0 .../model/cluster_volume_spec_access_mode_capacity_range.ex | 0 .../model/cluster_volume_spec_access_mode_secrets_inner.ex | 0 {lib/docker/impl => docker_engine_api}/model/commit.ex | 0 {lib/docker/impl => docker_engine_api}/model/config.ex | 0 .../impl => docker_engine_api}/model/config_create_request.ex | 0 {lib/docker/impl => docker_engine_api}/model/config_spec.ex | 0 .../impl => docker_engine_api}/model/container_config.ex | 0 .../model/container_create_request.ex | 0 .../model/container_create_response.ex | 0 .../model/container_inspect_response.ex | 0 .../model/container_prune_response.ex | 0 .../impl => docker_engine_api}/model/container_state.ex | 0 .../impl => docker_engine_api}/model/container_summary.ex | 0 .../model/container_summary_host_config.ex | 0 .../model/container_summary_network_settings.ex | 0 .../model/container_top_response.ex | 0 .../model/container_update_request.ex | 0 .../model/container_update_response.ex | 0 .../model/container_wait_exit_error.ex | 0 .../model/container_wait_response.ex | 0 .../impl => docker_engine_api}/model/create_image_info.ex | 0 .../docker/impl => docker_engine_api}/model/device_mapping.ex | 0 .../docker/impl => docker_engine_api}/model/device_request.ex | 0 .../impl => docker_engine_api}/model/distribution_inspect.ex | 0 {lib/docker/impl => docker_engine_api}/model/driver.ex | 0 .../impl => docker_engine_api}/model/endpoint_ipam_config.ex | 0 .../impl => docker_engine_api}/model/endpoint_port_config.ex | 0 .../impl => docker_engine_api}/model/endpoint_settings.ex | 0 {lib/docker/impl => docker_engine_api}/model/endpoint_spec.ex | 0 .../impl => docker_engine_api}/model/engine_description.ex | 0 .../model/engine_description_plugins_inner.ex | 0 {lib/docker/impl => docker_engine_api}/model/error_detail.ex | 0 .../docker/impl => docker_engine_api}/model/error_response.ex | 0 {lib/docker/impl => docker_engine_api}/model/event_actor.ex | 0 {lib/docker/impl => docker_engine_api}/model/event_message.ex | 0 {lib/docker/impl => docker_engine_api}/model/exec_config.ex | 0 .../impl => docker_engine_api}/model/exec_inspect_response.ex | 0 .../impl => docker_engine_api}/model/exec_start_config.ex | 0 .../impl => docker_engine_api}/model/filesystem_change.ex | 0 .../model/generic_resources_inner.ex | 0 .../model/generic_resources_inner_discrete_resource_spec.ex | 0 .../model/generic_resources_inner_named_resource_spec.ex | 0 .../impl => docker_engine_api}/model/graph_driver_data.ex | 0 {lib/docker/impl => docker_engine_api}/model/health.ex | 0 {lib/docker/impl => docker_engine_api}/model/health_config.ex | 0 .../impl => docker_engine_api}/model/healthcheck_result.ex | 0 .../impl => docker_engine_api}/model/history_response_item.ex | 0 {lib/docker/impl => docker_engine_api}/model/host_config.ex | 0 .../model/host_config_all_of_log_config.ex | 0 {lib/docker/impl => docker_engine_api}/model/id_response.ex | 0 .../model/image_delete_response_item.ex | 0 {lib/docker/impl => docker_engine_api}/model/image_id.ex | 0 {lib/docker/impl => docker_engine_api}/model/image_inspect.ex | 0 .../model/image_inspect_metadata.ex | 0 .../impl => docker_engine_api}/model/image_inspect_root_fs.ex | 0 .../impl => docker_engine_api}/model/image_prune_response.ex | 0 .../model/image_search_response_item.ex | 0 {lib/docker/impl => docker_engine_api}/model/image_summary.ex | 0 {lib/docker/impl => docker_engine_api}/model/index_info.ex | 0 {lib/docker/impl => docker_engine_api}/model/ipam.ex | 0 {lib/docker/impl => docker_engine_api}/model/ipam_config.ex | 0 {lib/docker/impl => docker_engine_api}/model/join_tokens.ex | 0 {lib/docker/impl => docker_engine_api}/model/limit.ex | 0 .../impl => docker_engine_api}/model/local_node_state.ex | 0 .../docker/impl => docker_engine_api}/model/manager_status.ex | 0 {lib/docker/impl => docker_engine_api}/model/mount.ex | 0 .../impl => docker_engine_api}/model/mount_bind_options.ex | 0 {lib/docker/impl => docker_engine_api}/model/mount_point.ex | 0 .../impl => docker_engine_api}/model/mount_tmpfs_options.ex | 0 .../impl => docker_engine_api}/model/mount_volume_options.ex | 0 .../model/mount_volume_options_driver_config.ex | 0 {lib/docker/impl => docker_engine_api}/model/network.ex | 0 .../model/network_attachment_config.ex | 0 .../model/network_connect_request.ex | 0 .../impl => docker_engine_api}/model/network_container.ex | 0 .../model/network_create_request.ex | 0 .../model/network_create_response.ex | 0 .../model/network_disconnect_request.ex | 0 .../model/network_prune_response.ex | 0 .../impl => docker_engine_api}/model/network_settings.ex | 0 .../impl => docker_engine_api}/model/networking_config.ex | 0 {lib/docker/impl => docker_engine_api}/model/node.ex | 0 .../impl => docker_engine_api}/model/node_description.ex | 0 {lib/docker/impl => docker_engine_api}/model/node_spec.ex | 0 {lib/docker/impl => docker_engine_api}/model/node_state.ex | 0 {lib/docker/impl => docker_engine_api}/model/node_status.ex | 0 .../docker/impl => docker_engine_api}/model/object_version.ex | 0 .../docker/impl => docker_engine_api}/model/oci_descriptor.ex | 0 {lib/docker/impl => docker_engine_api}/model/oci_platform.ex | 0 {lib/docker/impl => docker_engine_api}/model/peer_node.ex | 0 {lib/docker/impl => docker_engine_api}/model/platform.ex | 0 {lib/docker/impl => docker_engine_api}/model/plugin.ex | 0 {lib/docker/impl => docker_engine_api}/model/plugin_config.ex | 0 .../impl => docker_engine_api}/model/plugin_config_args.ex | 0 .../model/plugin_config_interface.ex | 0 .../impl => docker_engine_api}/model/plugin_config_linux.ex | 0 .../impl => docker_engine_api}/model/plugin_config_network.ex | 0 .../impl => docker_engine_api}/model/plugin_config_rootfs.ex | 0 .../impl => docker_engine_api}/model/plugin_config_user.ex | 0 {lib/docker/impl => docker_engine_api}/model/plugin_device.ex | 0 {lib/docker/impl => docker_engine_api}/model/plugin_env.ex | 0 .../impl => docker_engine_api}/model/plugin_interface_type.ex | 0 {lib/docker/impl => docker_engine_api}/model/plugin_mount.ex | 0 .../impl => docker_engine_api}/model/plugin_privilege.ex | 0 .../impl => docker_engine_api}/model/plugin_settings.ex | 0 {lib/docker/impl => docker_engine_api}/model/plugins_info.ex | 0 {lib/docker/impl => docker_engine_api}/model/port.ex | 0 {lib/docker/impl => docker_engine_api}/model/port_binding.ex | 0 .../docker/impl => docker_engine_api}/model/process_config.ex | 0 .../impl => docker_engine_api}/model/progress_detail.ex | 0 .../impl => docker_engine_api}/model/push_image_info.ex | 0 {lib/docker/impl => docker_engine_api}/model/reachability.ex | 0 .../model/registry_service_config.ex | 0 .../impl => docker_engine_api}/model/resource_object.ex | 0 {lib/docker/impl => docker_engine_api}/model/resources.ex | 0 .../model/resources_blkio_weight_device_inner.ex | 0 .../model/resources_ulimits_inner.ex | 0 .../docker/impl => docker_engine_api}/model/restart_policy.ex | 0 {lib/docker/impl => docker_engine_api}/model/runtime.ex | 0 {lib/docker/impl => docker_engine_api}/model/secret.ex | 0 .../impl => docker_engine_api}/model/secret_create_request.ex | 0 {lib/docker/impl => docker_engine_api}/model/secret_spec.ex | 0 {lib/docker/impl => docker_engine_api}/model/service.ex | 0 .../model/service_create_request.ex | 0 .../model/service_create_response.ex | 0 .../impl => docker_engine_api}/model/service_endpoint.ex | 0 .../model/service_endpoint_virtual_ips_inner.ex | 0 .../impl => docker_engine_api}/model/service_job_status.ex | 0 .../model/service_service_status.ex | 0 {lib/docker/impl => docker_engine_api}/model/service_spec.ex | 0 .../impl => docker_engine_api}/model/service_spec_mode.ex | 0 .../model/service_spec_mode_replicated.ex | 0 .../model/service_spec_mode_replicated_job.ex | 0 .../model/service_spec_rollback_config.ex | 0 .../model/service_spec_update_config.ex | 0 .../model/service_update_request.ex | 0 .../model/service_update_response.ex | 0 .../impl => docker_engine_api}/model/service_update_status.ex | 0 {lib/docker/impl => docker_engine_api}/model/swarm.ex | 0 {lib/docker/impl => docker_engine_api}/model/swarm_info.ex | 0 .../impl => docker_engine_api}/model/swarm_init_request.ex | 0 .../impl => docker_engine_api}/model/swarm_join_request.ex | 0 {lib/docker/impl => docker_engine_api}/model/swarm_spec.ex | 0 .../impl => docker_engine_api}/model/swarm_spec_ca_config.ex | 0 .../model/swarm_spec_ca_config_external_cas_inner.ex | 0 .../impl => docker_engine_api}/model/swarm_spec_dispatcher.ex | 0 .../model/swarm_spec_encryption_config.ex | 0 .../model/swarm_spec_orchestration.ex | 0 .../impl => docker_engine_api}/model/swarm_spec_raft.ex | 0 .../model/swarm_spec_task_defaults.ex | 0 .../model/swarm_spec_task_defaults_log_driver.ex | 0 .../impl => docker_engine_api}/model/swarm_unlock_request.ex | 0 .../impl => docker_engine_api}/model/system_auth_response.ex | 0 .../model/system_data_usage_response.ex | 0 {lib/docker/impl => docker_engine_api}/model/system_info.ex | 0 .../model/system_info_default_address_pools_inner.ex | 0 .../docker/impl => docker_engine_api}/model/system_version.ex | 0 .../model/system_version_components_inner.ex | 0 .../model/system_version_platform.ex | 0 {lib/docker/impl => docker_engine_api}/model/task.ex | 0 {lib/docker/impl => docker_engine_api}/model/task_spec.ex | 0 .../model/task_spec_container_spec.ex | 0 .../model/task_spec_container_spec_configs_inner.ex | 0 .../model/task_spec_container_spec_configs_inner_file.ex | 0 .../model/task_spec_container_spec_dns_config.ex | 0 .../model/task_spec_container_spec_privileges.ex | 0 .../task_spec_container_spec_privileges_credential_spec.ex | 0 .../task_spec_container_spec_privileges_se_linux_context.ex | 0 .../model/task_spec_container_spec_secrets_inner.ex | 0 .../model/task_spec_container_spec_secrets_inner_file.ex | 0 .../impl => docker_engine_api}/model/task_spec_log_driver.ex | 0 .../model/task_spec_network_attachment_spec.ex | 0 .../impl => docker_engine_api}/model/task_spec_placement.ex | 0 .../model/task_spec_placement_preferences_inner.ex | 0 .../model/task_spec_placement_preferences_inner_spread.ex | 0 .../impl => docker_engine_api}/model/task_spec_plugin_spec.ex | 0 .../impl => docker_engine_api}/model/task_spec_resources.ex | 0 .../model/task_spec_restart_policy.ex | 0 {lib/docker/impl => docker_engine_api}/model/task_state.ex | 0 {lib/docker/impl => docker_engine_api}/model/task_status.ex | 0 .../model/task_status_container_status.ex | 0 .../impl => docker_engine_api}/model/throttle_device.ex | 0 {lib/docker/impl => docker_engine_api}/model/tls_info.ex | 0 .../impl => docker_engine_api}/model/unlock_key_response.ex | 0 {lib/docker/impl => docker_engine_api}/model/volume.ex | 0 .../impl => docker_engine_api}/model/volume_create_options.ex | 0 .../impl => docker_engine_api}/model/volume_list_response.ex | 0 .../impl => docker_engine_api}/model/volume_prune_response.ex | 0 .../impl => docker_engine_api}/model/volume_update_request.ex | 0 .../impl => docker_engine_api}/model/volume_usage_data.ex | 0 {lib/docker/impl => docker_engine_api}/request_builder.ex | 0 mix.exs | 4 ++-- 222 files changed, 2 insertions(+), 2 deletions(-) rename {lib/docker/impl => docker_engine_api}/api/config.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/container.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/distribution.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/exec.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/image.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/network.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/node.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/plugin.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/secret.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/service.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/session.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/swarm.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/system.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/task.ex (100%) rename {lib/docker/impl => docker_engine_api}/api/volume.ex (100%) rename {lib/docker/impl => docker_engine_api}/connection.ex (100%) rename {lib/docker/impl => docker_engine_api}/deserializer.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/address.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/auth_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/build_cache.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/build_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/build_prune_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/change_type.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_publish_status_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_spec_access_mode.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_spec_access_mode_accessibility_requirements.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_spec_access_mode_capacity_range.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/cluster_volume_spec_access_mode_secrets_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/commit.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/config_create_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/config_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_create_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_create_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_inspect_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_prune_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_state.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_summary.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_summary_host_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_summary_network_settings.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_top_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_update_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_update_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_wait_exit_error.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/container_wait_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/create_image_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/device_mapping.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/device_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/distribution_inspect.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/driver.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/endpoint_ipam_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/endpoint_port_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/endpoint_settings.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/endpoint_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/engine_description.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/engine_description_plugins_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/error_detail.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/error_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/event_actor.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/event_message.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/exec_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/exec_inspect_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/exec_start_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/filesystem_change.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/generic_resources_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/generic_resources_inner_discrete_resource_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/generic_resources_inner_named_resource_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/graph_driver_data.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/health.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/health_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/healthcheck_result.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/history_response_item.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/host_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/host_config_all_of_log_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/id_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_delete_response_item.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_id.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_inspect.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_inspect_metadata.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_inspect_root_fs.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_prune_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_search_response_item.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/image_summary.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/index_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/ipam.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/ipam_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/join_tokens.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/limit.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/local_node_state.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/manager_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/mount.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/mount_bind_options.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/mount_point.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/mount_tmpfs_options.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/mount_volume_options.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/mount_volume_options_driver_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_attachment_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_connect_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_container.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_create_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_create_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_disconnect_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_prune_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/network_settings.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/networking_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/node.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/node_description.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/node_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/node_state.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/node_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/object_version.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/oci_descriptor.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/oci_platform.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/peer_node.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/platform.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config_args.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config_interface.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config_linux.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config_network.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config_rootfs.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_config_user.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_device.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_env.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_interface_type.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_mount.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_privilege.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugin_settings.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/plugins_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/port.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/port_binding.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/process_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/progress_detail.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/push_image_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/reachability.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/registry_service_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/resource_object.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/resources.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/resources_blkio_weight_device_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/resources_ulimits_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/restart_policy.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/runtime.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/secret.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/secret_create_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/secret_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_create_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_create_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_endpoint.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_endpoint_virtual_ips_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_job_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_service_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_spec_mode.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_spec_mode_replicated.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_spec_mode_replicated_job.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_spec_rollback_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_spec_update_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_update_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_update_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/service_update_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_init_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_join_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_ca_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_ca_config_external_cas_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_dispatcher.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_encryption_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_orchestration.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_raft.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_task_defaults.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_spec_task_defaults_log_driver.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/swarm_unlock_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_auth_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_data_usage_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_info_default_address_pools_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_version.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_version_components_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/system_version_platform.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_configs_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_configs_inner_file.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_dns_config.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_privileges.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_privileges_credential_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_privileges_se_linux_context.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_secrets_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_container_spec_secrets_inner_file.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_log_driver.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_network_attachment_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_placement.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_placement_preferences_inner.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_placement_preferences_inner_spread.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_plugin_spec.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_resources.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_spec_restart_policy.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_state.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/task_status_container_status.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/throttle_device.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/tls_info.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/unlock_key_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/volume.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/volume_create_options.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/volume_list_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/volume_prune_response.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/volume_update_request.ex (100%) rename {lib/docker/impl => docker_engine_api}/model/volume_usage_data.ex (100%) rename {lib/docker/impl => docker_engine_api}/request_builder.ex (100%) diff --git a/lib/docker/impl/api/config.ex b/docker_engine_api/api/config.ex similarity index 100% rename from lib/docker/impl/api/config.ex rename to docker_engine_api/api/config.ex diff --git a/lib/docker/impl/api/container.ex b/docker_engine_api/api/container.ex similarity index 100% rename from lib/docker/impl/api/container.ex rename to docker_engine_api/api/container.ex diff --git a/lib/docker/impl/api/distribution.ex b/docker_engine_api/api/distribution.ex similarity index 100% rename from lib/docker/impl/api/distribution.ex rename to docker_engine_api/api/distribution.ex diff --git a/lib/docker/impl/api/exec.ex b/docker_engine_api/api/exec.ex similarity index 100% rename from lib/docker/impl/api/exec.ex rename to docker_engine_api/api/exec.ex diff --git a/lib/docker/impl/api/image.ex b/docker_engine_api/api/image.ex similarity index 100% rename from lib/docker/impl/api/image.ex rename to docker_engine_api/api/image.ex diff --git a/lib/docker/impl/api/network.ex b/docker_engine_api/api/network.ex similarity index 100% rename from lib/docker/impl/api/network.ex rename to docker_engine_api/api/network.ex diff --git a/lib/docker/impl/api/node.ex b/docker_engine_api/api/node.ex similarity index 100% rename from lib/docker/impl/api/node.ex rename to docker_engine_api/api/node.ex diff --git a/lib/docker/impl/api/plugin.ex b/docker_engine_api/api/plugin.ex similarity index 100% rename from lib/docker/impl/api/plugin.ex rename to docker_engine_api/api/plugin.ex diff --git a/lib/docker/impl/api/secret.ex b/docker_engine_api/api/secret.ex similarity index 100% rename from lib/docker/impl/api/secret.ex rename to docker_engine_api/api/secret.ex diff --git a/lib/docker/impl/api/service.ex b/docker_engine_api/api/service.ex similarity index 100% rename from lib/docker/impl/api/service.ex rename to docker_engine_api/api/service.ex diff --git a/lib/docker/impl/api/session.ex b/docker_engine_api/api/session.ex similarity index 100% rename from lib/docker/impl/api/session.ex rename to docker_engine_api/api/session.ex diff --git a/lib/docker/impl/api/swarm.ex b/docker_engine_api/api/swarm.ex similarity index 100% rename from lib/docker/impl/api/swarm.ex rename to docker_engine_api/api/swarm.ex diff --git a/lib/docker/impl/api/system.ex b/docker_engine_api/api/system.ex similarity index 100% rename from lib/docker/impl/api/system.ex rename to docker_engine_api/api/system.ex diff --git a/lib/docker/impl/api/task.ex b/docker_engine_api/api/task.ex similarity index 100% rename from lib/docker/impl/api/task.ex rename to docker_engine_api/api/task.ex diff --git a/lib/docker/impl/api/volume.ex b/docker_engine_api/api/volume.ex similarity index 100% rename from lib/docker/impl/api/volume.ex rename to docker_engine_api/api/volume.ex diff --git a/lib/docker/impl/connection.ex b/docker_engine_api/connection.ex similarity index 100% rename from lib/docker/impl/connection.ex rename to docker_engine_api/connection.ex diff --git a/lib/docker/impl/deserializer.ex b/docker_engine_api/deserializer.ex similarity index 100% rename from lib/docker/impl/deserializer.ex rename to docker_engine_api/deserializer.ex diff --git a/lib/docker/impl/model/address.ex b/docker_engine_api/model/address.ex similarity index 100% rename from lib/docker/impl/model/address.ex rename to docker_engine_api/model/address.ex diff --git a/lib/docker/impl/model/auth_config.ex b/docker_engine_api/model/auth_config.ex similarity index 100% rename from lib/docker/impl/model/auth_config.ex rename to docker_engine_api/model/auth_config.ex diff --git a/lib/docker/impl/model/build_cache.ex b/docker_engine_api/model/build_cache.ex similarity index 100% rename from lib/docker/impl/model/build_cache.ex rename to docker_engine_api/model/build_cache.ex diff --git a/lib/docker/impl/model/build_info.ex b/docker_engine_api/model/build_info.ex similarity index 100% rename from lib/docker/impl/model/build_info.ex rename to docker_engine_api/model/build_info.ex diff --git a/lib/docker/impl/model/build_prune_response.ex b/docker_engine_api/model/build_prune_response.ex similarity index 100% rename from lib/docker/impl/model/build_prune_response.ex rename to docker_engine_api/model/build_prune_response.ex diff --git a/lib/docker/impl/model/change_type.ex b/docker_engine_api/model/change_type.ex similarity index 100% rename from lib/docker/impl/model/change_type.ex rename to docker_engine_api/model/change_type.ex diff --git a/lib/docker/impl/model/cluster_info.ex b/docker_engine_api/model/cluster_info.ex similarity index 100% rename from lib/docker/impl/model/cluster_info.ex rename to docker_engine_api/model/cluster_info.ex diff --git a/lib/docker/impl/model/cluster_volume.ex b/docker_engine_api/model/cluster_volume.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume.ex rename to docker_engine_api/model/cluster_volume.ex diff --git a/lib/docker/impl/model/cluster_volume_info.ex b/docker_engine_api/model/cluster_volume_info.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_info.ex rename to docker_engine_api/model/cluster_volume_info.ex diff --git a/lib/docker/impl/model/cluster_volume_publish_status_inner.ex b/docker_engine_api/model/cluster_volume_publish_status_inner.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_publish_status_inner.ex rename to docker_engine_api/model/cluster_volume_publish_status_inner.ex diff --git a/lib/docker/impl/model/cluster_volume_spec.ex b/docker_engine_api/model/cluster_volume_spec.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_spec.ex rename to docker_engine_api/model/cluster_volume_spec.ex diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode.ex b/docker_engine_api/model/cluster_volume_spec_access_mode.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_spec_access_mode.ex rename to docker_engine_api/model/cluster_volume_spec_access_mode.ex diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode_accessibility_requirements.ex b/docker_engine_api/model/cluster_volume_spec_access_mode_accessibility_requirements.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_spec_access_mode_accessibility_requirements.ex rename to docker_engine_api/model/cluster_volume_spec_access_mode_accessibility_requirements.ex diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode_capacity_range.ex b/docker_engine_api/model/cluster_volume_spec_access_mode_capacity_range.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_spec_access_mode_capacity_range.ex rename to docker_engine_api/model/cluster_volume_spec_access_mode_capacity_range.ex diff --git a/lib/docker/impl/model/cluster_volume_spec_access_mode_secrets_inner.ex b/docker_engine_api/model/cluster_volume_spec_access_mode_secrets_inner.ex similarity index 100% rename from lib/docker/impl/model/cluster_volume_spec_access_mode_secrets_inner.ex rename to docker_engine_api/model/cluster_volume_spec_access_mode_secrets_inner.ex diff --git a/lib/docker/impl/model/commit.ex b/docker_engine_api/model/commit.ex similarity index 100% rename from lib/docker/impl/model/commit.ex rename to docker_engine_api/model/commit.ex diff --git a/lib/docker/impl/model/config.ex b/docker_engine_api/model/config.ex similarity index 100% rename from lib/docker/impl/model/config.ex rename to docker_engine_api/model/config.ex diff --git a/lib/docker/impl/model/config_create_request.ex b/docker_engine_api/model/config_create_request.ex similarity index 100% rename from lib/docker/impl/model/config_create_request.ex rename to docker_engine_api/model/config_create_request.ex diff --git a/lib/docker/impl/model/config_spec.ex b/docker_engine_api/model/config_spec.ex similarity index 100% rename from lib/docker/impl/model/config_spec.ex rename to docker_engine_api/model/config_spec.ex diff --git a/lib/docker/impl/model/container_config.ex b/docker_engine_api/model/container_config.ex similarity index 100% rename from lib/docker/impl/model/container_config.ex rename to docker_engine_api/model/container_config.ex diff --git a/lib/docker/impl/model/container_create_request.ex b/docker_engine_api/model/container_create_request.ex similarity index 100% rename from lib/docker/impl/model/container_create_request.ex rename to docker_engine_api/model/container_create_request.ex diff --git a/lib/docker/impl/model/container_create_response.ex b/docker_engine_api/model/container_create_response.ex similarity index 100% rename from lib/docker/impl/model/container_create_response.ex rename to docker_engine_api/model/container_create_response.ex diff --git a/lib/docker/impl/model/container_inspect_response.ex b/docker_engine_api/model/container_inspect_response.ex similarity index 100% rename from lib/docker/impl/model/container_inspect_response.ex rename to docker_engine_api/model/container_inspect_response.ex diff --git a/lib/docker/impl/model/container_prune_response.ex b/docker_engine_api/model/container_prune_response.ex similarity index 100% rename from lib/docker/impl/model/container_prune_response.ex rename to docker_engine_api/model/container_prune_response.ex diff --git a/lib/docker/impl/model/container_state.ex b/docker_engine_api/model/container_state.ex similarity index 100% rename from lib/docker/impl/model/container_state.ex rename to docker_engine_api/model/container_state.ex diff --git a/lib/docker/impl/model/container_summary.ex b/docker_engine_api/model/container_summary.ex similarity index 100% rename from lib/docker/impl/model/container_summary.ex rename to docker_engine_api/model/container_summary.ex diff --git a/lib/docker/impl/model/container_summary_host_config.ex b/docker_engine_api/model/container_summary_host_config.ex similarity index 100% rename from lib/docker/impl/model/container_summary_host_config.ex rename to docker_engine_api/model/container_summary_host_config.ex diff --git a/lib/docker/impl/model/container_summary_network_settings.ex b/docker_engine_api/model/container_summary_network_settings.ex similarity index 100% rename from lib/docker/impl/model/container_summary_network_settings.ex rename to docker_engine_api/model/container_summary_network_settings.ex diff --git a/lib/docker/impl/model/container_top_response.ex b/docker_engine_api/model/container_top_response.ex similarity index 100% rename from lib/docker/impl/model/container_top_response.ex rename to docker_engine_api/model/container_top_response.ex diff --git a/lib/docker/impl/model/container_update_request.ex b/docker_engine_api/model/container_update_request.ex similarity index 100% rename from lib/docker/impl/model/container_update_request.ex rename to docker_engine_api/model/container_update_request.ex diff --git a/lib/docker/impl/model/container_update_response.ex b/docker_engine_api/model/container_update_response.ex similarity index 100% rename from lib/docker/impl/model/container_update_response.ex rename to docker_engine_api/model/container_update_response.ex diff --git a/lib/docker/impl/model/container_wait_exit_error.ex b/docker_engine_api/model/container_wait_exit_error.ex similarity index 100% rename from lib/docker/impl/model/container_wait_exit_error.ex rename to docker_engine_api/model/container_wait_exit_error.ex diff --git a/lib/docker/impl/model/container_wait_response.ex b/docker_engine_api/model/container_wait_response.ex similarity index 100% rename from lib/docker/impl/model/container_wait_response.ex rename to docker_engine_api/model/container_wait_response.ex diff --git a/lib/docker/impl/model/create_image_info.ex b/docker_engine_api/model/create_image_info.ex similarity index 100% rename from lib/docker/impl/model/create_image_info.ex rename to docker_engine_api/model/create_image_info.ex diff --git a/lib/docker/impl/model/device_mapping.ex b/docker_engine_api/model/device_mapping.ex similarity index 100% rename from lib/docker/impl/model/device_mapping.ex rename to docker_engine_api/model/device_mapping.ex diff --git a/lib/docker/impl/model/device_request.ex b/docker_engine_api/model/device_request.ex similarity index 100% rename from lib/docker/impl/model/device_request.ex rename to docker_engine_api/model/device_request.ex diff --git a/lib/docker/impl/model/distribution_inspect.ex b/docker_engine_api/model/distribution_inspect.ex similarity index 100% rename from lib/docker/impl/model/distribution_inspect.ex rename to docker_engine_api/model/distribution_inspect.ex diff --git a/lib/docker/impl/model/driver.ex b/docker_engine_api/model/driver.ex similarity index 100% rename from lib/docker/impl/model/driver.ex rename to docker_engine_api/model/driver.ex diff --git a/lib/docker/impl/model/endpoint_ipam_config.ex b/docker_engine_api/model/endpoint_ipam_config.ex similarity index 100% rename from lib/docker/impl/model/endpoint_ipam_config.ex rename to docker_engine_api/model/endpoint_ipam_config.ex diff --git a/lib/docker/impl/model/endpoint_port_config.ex b/docker_engine_api/model/endpoint_port_config.ex similarity index 100% rename from lib/docker/impl/model/endpoint_port_config.ex rename to docker_engine_api/model/endpoint_port_config.ex diff --git a/lib/docker/impl/model/endpoint_settings.ex b/docker_engine_api/model/endpoint_settings.ex similarity index 100% rename from lib/docker/impl/model/endpoint_settings.ex rename to docker_engine_api/model/endpoint_settings.ex diff --git a/lib/docker/impl/model/endpoint_spec.ex b/docker_engine_api/model/endpoint_spec.ex similarity index 100% rename from lib/docker/impl/model/endpoint_spec.ex rename to docker_engine_api/model/endpoint_spec.ex diff --git a/lib/docker/impl/model/engine_description.ex b/docker_engine_api/model/engine_description.ex similarity index 100% rename from lib/docker/impl/model/engine_description.ex rename to docker_engine_api/model/engine_description.ex diff --git a/lib/docker/impl/model/engine_description_plugins_inner.ex b/docker_engine_api/model/engine_description_plugins_inner.ex similarity index 100% rename from lib/docker/impl/model/engine_description_plugins_inner.ex rename to docker_engine_api/model/engine_description_plugins_inner.ex diff --git a/lib/docker/impl/model/error_detail.ex b/docker_engine_api/model/error_detail.ex similarity index 100% rename from lib/docker/impl/model/error_detail.ex rename to docker_engine_api/model/error_detail.ex diff --git a/lib/docker/impl/model/error_response.ex b/docker_engine_api/model/error_response.ex similarity index 100% rename from lib/docker/impl/model/error_response.ex rename to docker_engine_api/model/error_response.ex diff --git a/lib/docker/impl/model/event_actor.ex b/docker_engine_api/model/event_actor.ex similarity index 100% rename from lib/docker/impl/model/event_actor.ex rename to docker_engine_api/model/event_actor.ex diff --git a/lib/docker/impl/model/event_message.ex b/docker_engine_api/model/event_message.ex similarity index 100% rename from lib/docker/impl/model/event_message.ex rename to docker_engine_api/model/event_message.ex diff --git a/lib/docker/impl/model/exec_config.ex b/docker_engine_api/model/exec_config.ex similarity index 100% rename from lib/docker/impl/model/exec_config.ex rename to docker_engine_api/model/exec_config.ex diff --git a/lib/docker/impl/model/exec_inspect_response.ex b/docker_engine_api/model/exec_inspect_response.ex similarity index 100% rename from lib/docker/impl/model/exec_inspect_response.ex rename to docker_engine_api/model/exec_inspect_response.ex diff --git a/lib/docker/impl/model/exec_start_config.ex b/docker_engine_api/model/exec_start_config.ex similarity index 100% rename from lib/docker/impl/model/exec_start_config.ex rename to docker_engine_api/model/exec_start_config.ex diff --git a/lib/docker/impl/model/filesystem_change.ex b/docker_engine_api/model/filesystem_change.ex similarity index 100% rename from lib/docker/impl/model/filesystem_change.ex rename to docker_engine_api/model/filesystem_change.ex diff --git a/lib/docker/impl/model/generic_resources_inner.ex b/docker_engine_api/model/generic_resources_inner.ex similarity index 100% rename from lib/docker/impl/model/generic_resources_inner.ex rename to docker_engine_api/model/generic_resources_inner.ex diff --git a/lib/docker/impl/model/generic_resources_inner_discrete_resource_spec.ex b/docker_engine_api/model/generic_resources_inner_discrete_resource_spec.ex similarity index 100% rename from lib/docker/impl/model/generic_resources_inner_discrete_resource_spec.ex rename to docker_engine_api/model/generic_resources_inner_discrete_resource_spec.ex diff --git a/lib/docker/impl/model/generic_resources_inner_named_resource_spec.ex b/docker_engine_api/model/generic_resources_inner_named_resource_spec.ex similarity index 100% rename from lib/docker/impl/model/generic_resources_inner_named_resource_spec.ex rename to docker_engine_api/model/generic_resources_inner_named_resource_spec.ex diff --git a/lib/docker/impl/model/graph_driver_data.ex b/docker_engine_api/model/graph_driver_data.ex similarity index 100% rename from lib/docker/impl/model/graph_driver_data.ex rename to docker_engine_api/model/graph_driver_data.ex diff --git a/lib/docker/impl/model/health.ex b/docker_engine_api/model/health.ex similarity index 100% rename from lib/docker/impl/model/health.ex rename to docker_engine_api/model/health.ex diff --git a/lib/docker/impl/model/health_config.ex b/docker_engine_api/model/health_config.ex similarity index 100% rename from lib/docker/impl/model/health_config.ex rename to docker_engine_api/model/health_config.ex diff --git a/lib/docker/impl/model/healthcheck_result.ex b/docker_engine_api/model/healthcheck_result.ex similarity index 100% rename from lib/docker/impl/model/healthcheck_result.ex rename to docker_engine_api/model/healthcheck_result.ex diff --git a/lib/docker/impl/model/history_response_item.ex b/docker_engine_api/model/history_response_item.ex similarity index 100% rename from lib/docker/impl/model/history_response_item.ex rename to docker_engine_api/model/history_response_item.ex diff --git a/lib/docker/impl/model/host_config.ex b/docker_engine_api/model/host_config.ex similarity index 100% rename from lib/docker/impl/model/host_config.ex rename to docker_engine_api/model/host_config.ex diff --git a/lib/docker/impl/model/host_config_all_of_log_config.ex b/docker_engine_api/model/host_config_all_of_log_config.ex similarity index 100% rename from lib/docker/impl/model/host_config_all_of_log_config.ex rename to docker_engine_api/model/host_config_all_of_log_config.ex diff --git a/lib/docker/impl/model/id_response.ex b/docker_engine_api/model/id_response.ex similarity index 100% rename from lib/docker/impl/model/id_response.ex rename to docker_engine_api/model/id_response.ex diff --git a/lib/docker/impl/model/image_delete_response_item.ex b/docker_engine_api/model/image_delete_response_item.ex similarity index 100% rename from lib/docker/impl/model/image_delete_response_item.ex rename to docker_engine_api/model/image_delete_response_item.ex diff --git a/lib/docker/impl/model/image_id.ex b/docker_engine_api/model/image_id.ex similarity index 100% rename from lib/docker/impl/model/image_id.ex rename to docker_engine_api/model/image_id.ex diff --git a/lib/docker/impl/model/image_inspect.ex b/docker_engine_api/model/image_inspect.ex similarity index 100% rename from lib/docker/impl/model/image_inspect.ex rename to docker_engine_api/model/image_inspect.ex diff --git a/lib/docker/impl/model/image_inspect_metadata.ex b/docker_engine_api/model/image_inspect_metadata.ex similarity index 100% rename from lib/docker/impl/model/image_inspect_metadata.ex rename to docker_engine_api/model/image_inspect_metadata.ex diff --git a/lib/docker/impl/model/image_inspect_root_fs.ex b/docker_engine_api/model/image_inspect_root_fs.ex similarity index 100% rename from lib/docker/impl/model/image_inspect_root_fs.ex rename to docker_engine_api/model/image_inspect_root_fs.ex diff --git a/lib/docker/impl/model/image_prune_response.ex b/docker_engine_api/model/image_prune_response.ex similarity index 100% rename from lib/docker/impl/model/image_prune_response.ex rename to docker_engine_api/model/image_prune_response.ex diff --git a/lib/docker/impl/model/image_search_response_item.ex b/docker_engine_api/model/image_search_response_item.ex similarity index 100% rename from lib/docker/impl/model/image_search_response_item.ex rename to docker_engine_api/model/image_search_response_item.ex diff --git a/lib/docker/impl/model/image_summary.ex b/docker_engine_api/model/image_summary.ex similarity index 100% rename from lib/docker/impl/model/image_summary.ex rename to docker_engine_api/model/image_summary.ex diff --git a/lib/docker/impl/model/index_info.ex b/docker_engine_api/model/index_info.ex similarity index 100% rename from lib/docker/impl/model/index_info.ex rename to docker_engine_api/model/index_info.ex diff --git a/lib/docker/impl/model/ipam.ex b/docker_engine_api/model/ipam.ex similarity index 100% rename from lib/docker/impl/model/ipam.ex rename to docker_engine_api/model/ipam.ex diff --git a/lib/docker/impl/model/ipam_config.ex b/docker_engine_api/model/ipam_config.ex similarity index 100% rename from lib/docker/impl/model/ipam_config.ex rename to docker_engine_api/model/ipam_config.ex diff --git a/lib/docker/impl/model/join_tokens.ex b/docker_engine_api/model/join_tokens.ex similarity index 100% rename from lib/docker/impl/model/join_tokens.ex rename to docker_engine_api/model/join_tokens.ex diff --git a/lib/docker/impl/model/limit.ex b/docker_engine_api/model/limit.ex similarity index 100% rename from lib/docker/impl/model/limit.ex rename to docker_engine_api/model/limit.ex diff --git a/lib/docker/impl/model/local_node_state.ex b/docker_engine_api/model/local_node_state.ex similarity index 100% rename from lib/docker/impl/model/local_node_state.ex rename to docker_engine_api/model/local_node_state.ex diff --git a/lib/docker/impl/model/manager_status.ex b/docker_engine_api/model/manager_status.ex similarity index 100% rename from lib/docker/impl/model/manager_status.ex rename to docker_engine_api/model/manager_status.ex diff --git a/lib/docker/impl/model/mount.ex b/docker_engine_api/model/mount.ex similarity index 100% rename from lib/docker/impl/model/mount.ex rename to docker_engine_api/model/mount.ex diff --git a/lib/docker/impl/model/mount_bind_options.ex b/docker_engine_api/model/mount_bind_options.ex similarity index 100% rename from lib/docker/impl/model/mount_bind_options.ex rename to docker_engine_api/model/mount_bind_options.ex diff --git a/lib/docker/impl/model/mount_point.ex b/docker_engine_api/model/mount_point.ex similarity index 100% rename from lib/docker/impl/model/mount_point.ex rename to docker_engine_api/model/mount_point.ex diff --git a/lib/docker/impl/model/mount_tmpfs_options.ex b/docker_engine_api/model/mount_tmpfs_options.ex similarity index 100% rename from lib/docker/impl/model/mount_tmpfs_options.ex rename to docker_engine_api/model/mount_tmpfs_options.ex diff --git a/lib/docker/impl/model/mount_volume_options.ex b/docker_engine_api/model/mount_volume_options.ex similarity index 100% rename from lib/docker/impl/model/mount_volume_options.ex rename to docker_engine_api/model/mount_volume_options.ex diff --git a/lib/docker/impl/model/mount_volume_options_driver_config.ex b/docker_engine_api/model/mount_volume_options_driver_config.ex similarity index 100% rename from lib/docker/impl/model/mount_volume_options_driver_config.ex rename to docker_engine_api/model/mount_volume_options_driver_config.ex diff --git a/lib/docker/impl/model/network.ex b/docker_engine_api/model/network.ex similarity index 100% rename from lib/docker/impl/model/network.ex rename to docker_engine_api/model/network.ex diff --git a/lib/docker/impl/model/network_attachment_config.ex b/docker_engine_api/model/network_attachment_config.ex similarity index 100% rename from lib/docker/impl/model/network_attachment_config.ex rename to docker_engine_api/model/network_attachment_config.ex diff --git a/lib/docker/impl/model/network_connect_request.ex b/docker_engine_api/model/network_connect_request.ex similarity index 100% rename from lib/docker/impl/model/network_connect_request.ex rename to docker_engine_api/model/network_connect_request.ex diff --git a/lib/docker/impl/model/network_container.ex b/docker_engine_api/model/network_container.ex similarity index 100% rename from lib/docker/impl/model/network_container.ex rename to docker_engine_api/model/network_container.ex diff --git a/lib/docker/impl/model/network_create_request.ex b/docker_engine_api/model/network_create_request.ex similarity index 100% rename from lib/docker/impl/model/network_create_request.ex rename to docker_engine_api/model/network_create_request.ex diff --git a/lib/docker/impl/model/network_create_response.ex b/docker_engine_api/model/network_create_response.ex similarity index 100% rename from lib/docker/impl/model/network_create_response.ex rename to docker_engine_api/model/network_create_response.ex diff --git a/lib/docker/impl/model/network_disconnect_request.ex b/docker_engine_api/model/network_disconnect_request.ex similarity index 100% rename from lib/docker/impl/model/network_disconnect_request.ex rename to docker_engine_api/model/network_disconnect_request.ex diff --git a/lib/docker/impl/model/network_prune_response.ex b/docker_engine_api/model/network_prune_response.ex similarity index 100% rename from lib/docker/impl/model/network_prune_response.ex rename to docker_engine_api/model/network_prune_response.ex diff --git a/lib/docker/impl/model/network_settings.ex b/docker_engine_api/model/network_settings.ex similarity index 100% rename from lib/docker/impl/model/network_settings.ex rename to docker_engine_api/model/network_settings.ex diff --git a/lib/docker/impl/model/networking_config.ex b/docker_engine_api/model/networking_config.ex similarity index 100% rename from lib/docker/impl/model/networking_config.ex rename to docker_engine_api/model/networking_config.ex diff --git a/lib/docker/impl/model/node.ex b/docker_engine_api/model/node.ex similarity index 100% rename from lib/docker/impl/model/node.ex rename to docker_engine_api/model/node.ex diff --git a/lib/docker/impl/model/node_description.ex b/docker_engine_api/model/node_description.ex similarity index 100% rename from lib/docker/impl/model/node_description.ex rename to docker_engine_api/model/node_description.ex diff --git a/lib/docker/impl/model/node_spec.ex b/docker_engine_api/model/node_spec.ex similarity index 100% rename from lib/docker/impl/model/node_spec.ex rename to docker_engine_api/model/node_spec.ex diff --git a/lib/docker/impl/model/node_state.ex b/docker_engine_api/model/node_state.ex similarity index 100% rename from lib/docker/impl/model/node_state.ex rename to docker_engine_api/model/node_state.ex diff --git a/lib/docker/impl/model/node_status.ex b/docker_engine_api/model/node_status.ex similarity index 100% rename from lib/docker/impl/model/node_status.ex rename to docker_engine_api/model/node_status.ex diff --git a/lib/docker/impl/model/object_version.ex b/docker_engine_api/model/object_version.ex similarity index 100% rename from lib/docker/impl/model/object_version.ex rename to docker_engine_api/model/object_version.ex diff --git a/lib/docker/impl/model/oci_descriptor.ex b/docker_engine_api/model/oci_descriptor.ex similarity index 100% rename from lib/docker/impl/model/oci_descriptor.ex rename to docker_engine_api/model/oci_descriptor.ex diff --git a/lib/docker/impl/model/oci_platform.ex b/docker_engine_api/model/oci_platform.ex similarity index 100% rename from lib/docker/impl/model/oci_platform.ex rename to docker_engine_api/model/oci_platform.ex diff --git a/lib/docker/impl/model/peer_node.ex b/docker_engine_api/model/peer_node.ex similarity index 100% rename from lib/docker/impl/model/peer_node.ex rename to docker_engine_api/model/peer_node.ex diff --git a/lib/docker/impl/model/platform.ex b/docker_engine_api/model/platform.ex similarity index 100% rename from lib/docker/impl/model/platform.ex rename to docker_engine_api/model/platform.ex diff --git a/lib/docker/impl/model/plugin.ex b/docker_engine_api/model/plugin.ex similarity index 100% rename from lib/docker/impl/model/plugin.ex rename to docker_engine_api/model/plugin.ex diff --git a/lib/docker/impl/model/plugin_config.ex b/docker_engine_api/model/plugin_config.ex similarity index 100% rename from lib/docker/impl/model/plugin_config.ex rename to docker_engine_api/model/plugin_config.ex diff --git a/lib/docker/impl/model/plugin_config_args.ex b/docker_engine_api/model/plugin_config_args.ex similarity index 100% rename from lib/docker/impl/model/plugin_config_args.ex rename to docker_engine_api/model/plugin_config_args.ex diff --git a/lib/docker/impl/model/plugin_config_interface.ex b/docker_engine_api/model/plugin_config_interface.ex similarity index 100% rename from lib/docker/impl/model/plugin_config_interface.ex rename to docker_engine_api/model/plugin_config_interface.ex diff --git a/lib/docker/impl/model/plugin_config_linux.ex b/docker_engine_api/model/plugin_config_linux.ex similarity index 100% rename from lib/docker/impl/model/plugin_config_linux.ex rename to docker_engine_api/model/plugin_config_linux.ex diff --git a/lib/docker/impl/model/plugin_config_network.ex b/docker_engine_api/model/plugin_config_network.ex similarity index 100% rename from lib/docker/impl/model/plugin_config_network.ex rename to docker_engine_api/model/plugin_config_network.ex diff --git a/lib/docker/impl/model/plugin_config_rootfs.ex b/docker_engine_api/model/plugin_config_rootfs.ex similarity index 100% rename from lib/docker/impl/model/plugin_config_rootfs.ex rename to docker_engine_api/model/plugin_config_rootfs.ex diff --git a/lib/docker/impl/model/plugin_config_user.ex b/docker_engine_api/model/plugin_config_user.ex similarity index 100% rename from lib/docker/impl/model/plugin_config_user.ex rename to docker_engine_api/model/plugin_config_user.ex diff --git a/lib/docker/impl/model/plugin_device.ex b/docker_engine_api/model/plugin_device.ex similarity index 100% rename from lib/docker/impl/model/plugin_device.ex rename to docker_engine_api/model/plugin_device.ex diff --git a/lib/docker/impl/model/plugin_env.ex b/docker_engine_api/model/plugin_env.ex similarity index 100% rename from lib/docker/impl/model/plugin_env.ex rename to docker_engine_api/model/plugin_env.ex diff --git a/lib/docker/impl/model/plugin_interface_type.ex b/docker_engine_api/model/plugin_interface_type.ex similarity index 100% rename from lib/docker/impl/model/plugin_interface_type.ex rename to docker_engine_api/model/plugin_interface_type.ex diff --git a/lib/docker/impl/model/plugin_mount.ex b/docker_engine_api/model/plugin_mount.ex similarity index 100% rename from lib/docker/impl/model/plugin_mount.ex rename to docker_engine_api/model/plugin_mount.ex diff --git a/lib/docker/impl/model/plugin_privilege.ex b/docker_engine_api/model/plugin_privilege.ex similarity index 100% rename from lib/docker/impl/model/plugin_privilege.ex rename to docker_engine_api/model/plugin_privilege.ex diff --git a/lib/docker/impl/model/plugin_settings.ex b/docker_engine_api/model/plugin_settings.ex similarity index 100% rename from lib/docker/impl/model/plugin_settings.ex rename to docker_engine_api/model/plugin_settings.ex diff --git a/lib/docker/impl/model/plugins_info.ex b/docker_engine_api/model/plugins_info.ex similarity index 100% rename from lib/docker/impl/model/plugins_info.ex rename to docker_engine_api/model/plugins_info.ex diff --git a/lib/docker/impl/model/port.ex b/docker_engine_api/model/port.ex similarity index 100% rename from lib/docker/impl/model/port.ex rename to docker_engine_api/model/port.ex diff --git a/lib/docker/impl/model/port_binding.ex b/docker_engine_api/model/port_binding.ex similarity index 100% rename from lib/docker/impl/model/port_binding.ex rename to docker_engine_api/model/port_binding.ex diff --git a/lib/docker/impl/model/process_config.ex b/docker_engine_api/model/process_config.ex similarity index 100% rename from lib/docker/impl/model/process_config.ex rename to docker_engine_api/model/process_config.ex diff --git a/lib/docker/impl/model/progress_detail.ex b/docker_engine_api/model/progress_detail.ex similarity index 100% rename from lib/docker/impl/model/progress_detail.ex rename to docker_engine_api/model/progress_detail.ex diff --git a/lib/docker/impl/model/push_image_info.ex b/docker_engine_api/model/push_image_info.ex similarity index 100% rename from lib/docker/impl/model/push_image_info.ex rename to docker_engine_api/model/push_image_info.ex diff --git a/lib/docker/impl/model/reachability.ex b/docker_engine_api/model/reachability.ex similarity index 100% rename from lib/docker/impl/model/reachability.ex rename to docker_engine_api/model/reachability.ex diff --git a/lib/docker/impl/model/registry_service_config.ex b/docker_engine_api/model/registry_service_config.ex similarity index 100% rename from lib/docker/impl/model/registry_service_config.ex rename to docker_engine_api/model/registry_service_config.ex diff --git a/lib/docker/impl/model/resource_object.ex b/docker_engine_api/model/resource_object.ex similarity index 100% rename from lib/docker/impl/model/resource_object.ex rename to docker_engine_api/model/resource_object.ex diff --git a/lib/docker/impl/model/resources.ex b/docker_engine_api/model/resources.ex similarity index 100% rename from lib/docker/impl/model/resources.ex rename to docker_engine_api/model/resources.ex diff --git a/lib/docker/impl/model/resources_blkio_weight_device_inner.ex b/docker_engine_api/model/resources_blkio_weight_device_inner.ex similarity index 100% rename from lib/docker/impl/model/resources_blkio_weight_device_inner.ex rename to docker_engine_api/model/resources_blkio_weight_device_inner.ex diff --git a/lib/docker/impl/model/resources_ulimits_inner.ex b/docker_engine_api/model/resources_ulimits_inner.ex similarity index 100% rename from lib/docker/impl/model/resources_ulimits_inner.ex rename to docker_engine_api/model/resources_ulimits_inner.ex diff --git a/lib/docker/impl/model/restart_policy.ex b/docker_engine_api/model/restart_policy.ex similarity index 100% rename from lib/docker/impl/model/restart_policy.ex rename to docker_engine_api/model/restart_policy.ex diff --git a/lib/docker/impl/model/runtime.ex b/docker_engine_api/model/runtime.ex similarity index 100% rename from lib/docker/impl/model/runtime.ex rename to docker_engine_api/model/runtime.ex diff --git a/lib/docker/impl/model/secret.ex b/docker_engine_api/model/secret.ex similarity index 100% rename from lib/docker/impl/model/secret.ex rename to docker_engine_api/model/secret.ex diff --git a/lib/docker/impl/model/secret_create_request.ex b/docker_engine_api/model/secret_create_request.ex similarity index 100% rename from lib/docker/impl/model/secret_create_request.ex rename to docker_engine_api/model/secret_create_request.ex diff --git a/lib/docker/impl/model/secret_spec.ex b/docker_engine_api/model/secret_spec.ex similarity index 100% rename from lib/docker/impl/model/secret_spec.ex rename to docker_engine_api/model/secret_spec.ex diff --git a/lib/docker/impl/model/service.ex b/docker_engine_api/model/service.ex similarity index 100% rename from lib/docker/impl/model/service.ex rename to docker_engine_api/model/service.ex diff --git a/lib/docker/impl/model/service_create_request.ex b/docker_engine_api/model/service_create_request.ex similarity index 100% rename from lib/docker/impl/model/service_create_request.ex rename to docker_engine_api/model/service_create_request.ex diff --git a/lib/docker/impl/model/service_create_response.ex b/docker_engine_api/model/service_create_response.ex similarity index 100% rename from lib/docker/impl/model/service_create_response.ex rename to docker_engine_api/model/service_create_response.ex diff --git a/lib/docker/impl/model/service_endpoint.ex b/docker_engine_api/model/service_endpoint.ex similarity index 100% rename from lib/docker/impl/model/service_endpoint.ex rename to docker_engine_api/model/service_endpoint.ex diff --git a/lib/docker/impl/model/service_endpoint_virtual_ips_inner.ex b/docker_engine_api/model/service_endpoint_virtual_ips_inner.ex similarity index 100% rename from lib/docker/impl/model/service_endpoint_virtual_ips_inner.ex rename to docker_engine_api/model/service_endpoint_virtual_ips_inner.ex diff --git a/lib/docker/impl/model/service_job_status.ex b/docker_engine_api/model/service_job_status.ex similarity index 100% rename from lib/docker/impl/model/service_job_status.ex rename to docker_engine_api/model/service_job_status.ex diff --git a/lib/docker/impl/model/service_service_status.ex b/docker_engine_api/model/service_service_status.ex similarity index 100% rename from lib/docker/impl/model/service_service_status.ex rename to docker_engine_api/model/service_service_status.ex diff --git a/lib/docker/impl/model/service_spec.ex b/docker_engine_api/model/service_spec.ex similarity index 100% rename from lib/docker/impl/model/service_spec.ex rename to docker_engine_api/model/service_spec.ex diff --git a/lib/docker/impl/model/service_spec_mode.ex b/docker_engine_api/model/service_spec_mode.ex similarity index 100% rename from lib/docker/impl/model/service_spec_mode.ex rename to docker_engine_api/model/service_spec_mode.ex diff --git a/lib/docker/impl/model/service_spec_mode_replicated.ex b/docker_engine_api/model/service_spec_mode_replicated.ex similarity index 100% rename from lib/docker/impl/model/service_spec_mode_replicated.ex rename to docker_engine_api/model/service_spec_mode_replicated.ex diff --git a/lib/docker/impl/model/service_spec_mode_replicated_job.ex b/docker_engine_api/model/service_spec_mode_replicated_job.ex similarity index 100% rename from lib/docker/impl/model/service_spec_mode_replicated_job.ex rename to docker_engine_api/model/service_spec_mode_replicated_job.ex diff --git a/lib/docker/impl/model/service_spec_rollback_config.ex b/docker_engine_api/model/service_spec_rollback_config.ex similarity index 100% rename from lib/docker/impl/model/service_spec_rollback_config.ex rename to docker_engine_api/model/service_spec_rollback_config.ex diff --git a/lib/docker/impl/model/service_spec_update_config.ex b/docker_engine_api/model/service_spec_update_config.ex similarity index 100% rename from lib/docker/impl/model/service_spec_update_config.ex rename to docker_engine_api/model/service_spec_update_config.ex diff --git a/lib/docker/impl/model/service_update_request.ex b/docker_engine_api/model/service_update_request.ex similarity index 100% rename from lib/docker/impl/model/service_update_request.ex rename to docker_engine_api/model/service_update_request.ex diff --git a/lib/docker/impl/model/service_update_response.ex b/docker_engine_api/model/service_update_response.ex similarity index 100% rename from lib/docker/impl/model/service_update_response.ex rename to docker_engine_api/model/service_update_response.ex diff --git a/lib/docker/impl/model/service_update_status.ex b/docker_engine_api/model/service_update_status.ex similarity index 100% rename from lib/docker/impl/model/service_update_status.ex rename to docker_engine_api/model/service_update_status.ex diff --git a/lib/docker/impl/model/swarm.ex b/docker_engine_api/model/swarm.ex similarity index 100% rename from lib/docker/impl/model/swarm.ex rename to docker_engine_api/model/swarm.ex diff --git a/lib/docker/impl/model/swarm_info.ex b/docker_engine_api/model/swarm_info.ex similarity index 100% rename from lib/docker/impl/model/swarm_info.ex rename to docker_engine_api/model/swarm_info.ex diff --git a/lib/docker/impl/model/swarm_init_request.ex b/docker_engine_api/model/swarm_init_request.ex similarity index 100% rename from lib/docker/impl/model/swarm_init_request.ex rename to docker_engine_api/model/swarm_init_request.ex diff --git a/lib/docker/impl/model/swarm_join_request.ex b/docker_engine_api/model/swarm_join_request.ex similarity index 100% rename from lib/docker/impl/model/swarm_join_request.ex rename to docker_engine_api/model/swarm_join_request.ex diff --git a/lib/docker/impl/model/swarm_spec.ex b/docker_engine_api/model/swarm_spec.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec.ex rename to docker_engine_api/model/swarm_spec.ex diff --git a/lib/docker/impl/model/swarm_spec_ca_config.ex b/docker_engine_api/model/swarm_spec_ca_config.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_ca_config.ex rename to docker_engine_api/model/swarm_spec_ca_config.ex diff --git a/lib/docker/impl/model/swarm_spec_ca_config_external_cas_inner.ex b/docker_engine_api/model/swarm_spec_ca_config_external_cas_inner.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_ca_config_external_cas_inner.ex rename to docker_engine_api/model/swarm_spec_ca_config_external_cas_inner.ex diff --git a/lib/docker/impl/model/swarm_spec_dispatcher.ex b/docker_engine_api/model/swarm_spec_dispatcher.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_dispatcher.ex rename to docker_engine_api/model/swarm_spec_dispatcher.ex diff --git a/lib/docker/impl/model/swarm_spec_encryption_config.ex b/docker_engine_api/model/swarm_spec_encryption_config.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_encryption_config.ex rename to docker_engine_api/model/swarm_spec_encryption_config.ex diff --git a/lib/docker/impl/model/swarm_spec_orchestration.ex b/docker_engine_api/model/swarm_spec_orchestration.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_orchestration.ex rename to docker_engine_api/model/swarm_spec_orchestration.ex diff --git a/lib/docker/impl/model/swarm_spec_raft.ex b/docker_engine_api/model/swarm_spec_raft.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_raft.ex rename to docker_engine_api/model/swarm_spec_raft.ex diff --git a/lib/docker/impl/model/swarm_spec_task_defaults.ex b/docker_engine_api/model/swarm_spec_task_defaults.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_task_defaults.ex rename to docker_engine_api/model/swarm_spec_task_defaults.ex diff --git a/lib/docker/impl/model/swarm_spec_task_defaults_log_driver.ex b/docker_engine_api/model/swarm_spec_task_defaults_log_driver.ex similarity index 100% rename from lib/docker/impl/model/swarm_spec_task_defaults_log_driver.ex rename to docker_engine_api/model/swarm_spec_task_defaults_log_driver.ex diff --git a/lib/docker/impl/model/swarm_unlock_request.ex b/docker_engine_api/model/swarm_unlock_request.ex similarity index 100% rename from lib/docker/impl/model/swarm_unlock_request.ex rename to docker_engine_api/model/swarm_unlock_request.ex diff --git a/lib/docker/impl/model/system_auth_response.ex b/docker_engine_api/model/system_auth_response.ex similarity index 100% rename from lib/docker/impl/model/system_auth_response.ex rename to docker_engine_api/model/system_auth_response.ex diff --git a/lib/docker/impl/model/system_data_usage_response.ex b/docker_engine_api/model/system_data_usage_response.ex similarity index 100% rename from lib/docker/impl/model/system_data_usage_response.ex rename to docker_engine_api/model/system_data_usage_response.ex diff --git a/lib/docker/impl/model/system_info.ex b/docker_engine_api/model/system_info.ex similarity index 100% rename from lib/docker/impl/model/system_info.ex rename to docker_engine_api/model/system_info.ex diff --git a/lib/docker/impl/model/system_info_default_address_pools_inner.ex b/docker_engine_api/model/system_info_default_address_pools_inner.ex similarity index 100% rename from lib/docker/impl/model/system_info_default_address_pools_inner.ex rename to docker_engine_api/model/system_info_default_address_pools_inner.ex diff --git a/lib/docker/impl/model/system_version.ex b/docker_engine_api/model/system_version.ex similarity index 100% rename from lib/docker/impl/model/system_version.ex rename to docker_engine_api/model/system_version.ex diff --git a/lib/docker/impl/model/system_version_components_inner.ex b/docker_engine_api/model/system_version_components_inner.ex similarity index 100% rename from lib/docker/impl/model/system_version_components_inner.ex rename to docker_engine_api/model/system_version_components_inner.ex diff --git a/lib/docker/impl/model/system_version_platform.ex b/docker_engine_api/model/system_version_platform.ex similarity index 100% rename from lib/docker/impl/model/system_version_platform.ex rename to docker_engine_api/model/system_version_platform.ex diff --git a/lib/docker/impl/model/task.ex b/docker_engine_api/model/task.ex similarity index 100% rename from lib/docker/impl/model/task.ex rename to docker_engine_api/model/task.ex diff --git a/lib/docker/impl/model/task_spec.ex b/docker_engine_api/model/task_spec.ex similarity index 100% rename from lib/docker/impl/model/task_spec.ex rename to docker_engine_api/model/task_spec.ex diff --git a/lib/docker/impl/model/task_spec_container_spec.ex b/docker_engine_api/model/task_spec_container_spec.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec.ex rename to docker_engine_api/model/task_spec_container_spec.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_configs_inner.ex b/docker_engine_api/model/task_spec_container_spec_configs_inner.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_configs_inner.ex rename to docker_engine_api/model/task_spec_container_spec_configs_inner.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_configs_inner_file.ex b/docker_engine_api/model/task_spec_container_spec_configs_inner_file.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_configs_inner_file.ex rename to docker_engine_api/model/task_spec_container_spec_configs_inner_file.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_dns_config.ex b/docker_engine_api/model/task_spec_container_spec_dns_config.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_dns_config.ex rename to docker_engine_api/model/task_spec_container_spec_dns_config.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_privileges.ex b/docker_engine_api/model/task_spec_container_spec_privileges.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_privileges.ex rename to docker_engine_api/model/task_spec_container_spec_privileges.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_privileges_credential_spec.ex b/docker_engine_api/model/task_spec_container_spec_privileges_credential_spec.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_privileges_credential_spec.ex rename to docker_engine_api/model/task_spec_container_spec_privileges_credential_spec.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_privileges_se_linux_context.ex b/docker_engine_api/model/task_spec_container_spec_privileges_se_linux_context.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_privileges_se_linux_context.ex rename to docker_engine_api/model/task_spec_container_spec_privileges_se_linux_context.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_secrets_inner.ex b/docker_engine_api/model/task_spec_container_spec_secrets_inner.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_secrets_inner.ex rename to docker_engine_api/model/task_spec_container_spec_secrets_inner.ex diff --git a/lib/docker/impl/model/task_spec_container_spec_secrets_inner_file.ex b/docker_engine_api/model/task_spec_container_spec_secrets_inner_file.ex similarity index 100% rename from lib/docker/impl/model/task_spec_container_spec_secrets_inner_file.ex rename to docker_engine_api/model/task_spec_container_spec_secrets_inner_file.ex diff --git a/lib/docker/impl/model/task_spec_log_driver.ex b/docker_engine_api/model/task_spec_log_driver.ex similarity index 100% rename from lib/docker/impl/model/task_spec_log_driver.ex rename to docker_engine_api/model/task_spec_log_driver.ex diff --git a/lib/docker/impl/model/task_spec_network_attachment_spec.ex b/docker_engine_api/model/task_spec_network_attachment_spec.ex similarity index 100% rename from lib/docker/impl/model/task_spec_network_attachment_spec.ex rename to docker_engine_api/model/task_spec_network_attachment_spec.ex diff --git a/lib/docker/impl/model/task_spec_placement.ex b/docker_engine_api/model/task_spec_placement.ex similarity index 100% rename from lib/docker/impl/model/task_spec_placement.ex rename to docker_engine_api/model/task_spec_placement.ex diff --git a/lib/docker/impl/model/task_spec_placement_preferences_inner.ex b/docker_engine_api/model/task_spec_placement_preferences_inner.ex similarity index 100% rename from lib/docker/impl/model/task_spec_placement_preferences_inner.ex rename to docker_engine_api/model/task_spec_placement_preferences_inner.ex diff --git a/lib/docker/impl/model/task_spec_placement_preferences_inner_spread.ex b/docker_engine_api/model/task_spec_placement_preferences_inner_spread.ex similarity index 100% rename from lib/docker/impl/model/task_spec_placement_preferences_inner_spread.ex rename to docker_engine_api/model/task_spec_placement_preferences_inner_spread.ex diff --git a/lib/docker/impl/model/task_spec_plugin_spec.ex b/docker_engine_api/model/task_spec_plugin_spec.ex similarity index 100% rename from lib/docker/impl/model/task_spec_plugin_spec.ex rename to docker_engine_api/model/task_spec_plugin_spec.ex diff --git a/lib/docker/impl/model/task_spec_resources.ex b/docker_engine_api/model/task_spec_resources.ex similarity index 100% rename from lib/docker/impl/model/task_spec_resources.ex rename to docker_engine_api/model/task_spec_resources.ex diff --git a/lib/docker/impl/model/task_spec_restart_policy.ex b/docker_engine_api/model/task_spec_restart_policy.ex similarity index 100% rename from lib/docker/impl/model/task_spec_restart_policy.ex rename to docker_engine_api/model/task_spec_restart_policy.ex diff --git a/lib/docker/impl/model/task_state.ex b/docker_engine_api/model/task_state.ex similarity index 100% rename from lib/docker/impl/model/task_state.ex rename to docker_engine_api/model/task_state.ex diff --git a/lib/docker/impl/model/task_status.ex b/docker_engine_api/model/task_status.ex similarity index 100% rename from lib/docker/impl/model/task_status.ex rename to docker_engine_api/model/task_status.ex diff --git a/lib/docker/impl/model/task_status_container_status.ex b/docker_engine_api/model/task_status_container_status.ex similarity index 100% rename from lib/docker/impl/model/task_status_container_status.ex rename to docker_engine_api/model/task_status_container_status.ex diff --git a/lib/docker/impl/model/throttle_device.ex b/docker_engine_api/model/throttle_device.ex similarity index 100% rename from lib/docker/impl/model/throttle_device.ex rename to docker_engine_api/model/throttle_device.ex diff --git a/lib/docker/impl/model/tls_info.ex b/docker_engine_api/model/tls_info.ex similarity index 100% rename from lib/docker/impl/model/tls_info.ex rename to docker_engine_api/model/tls_info.ex diff --git a/lib/docker/impl/model/unlock_key_response.ex b/docker_engine_api/model/unlock_key_response.ex similarity index 100% rename from lib/docker/impl/model/unlock_key_response.ex rename to docker_engine_api/model/unlock_key_response.ex diff --git a/lib/docker/impl/model/volume.ex b/docker_engine_api/model/volume.ex similarity index 100% rename from lib/docker/impl/model/volume.ex rename to docker_engine_api/model/volume.ex diff --git a/lib/docker/impl/model/volume_create_options.ex b/docker_engine_api/model/volume_create_options.ex similarity index 100% rename from lib/docker/impl/model/volume_create_options.ex rename to docker_engine_api/model/volume_create_options.ex diff --git a/lib/docker/impl/model/volume_list_response.ex b/docker_engine_api/model/volume_list_response.ex similarity index 100% rename from lib/docker/impl/model/volume_list_response.ex rename to docker_engine_api/model/volume_list_response.ex diff --git a/lib/docker/impl/model/volume_prune_response.ex b/docker_engine_api/model/volume_prune_response.ex similarity index 100% rename from lib/docker/impl/model/volume_prune_response.ex rename to docker_engine_api/model/volume_prune_response.ex diff --git a/lib/docker/impl/model/volume_update_request.ex b/docker_engine_api/model/volume_update_request.ex similarity index 100% rename from lib/docker/impl/model/volume_update_request.ex rename to docker_engine_api/model/volume_update_request.ex diff --git a/lib/docker/impl/model/volume_usage_data.ex b/docker_engine_api/model/volume_usage_data.ex similarity index 100% rename from lib/docker/impl/model/volume_usage_data.ex rename to docker_engine_api/model/volume_usage_data.ex diff --git a/lib/docker/impl/request_builder.ex b/docker_engine_api/request_builder.ex similarity index 100% rename from lib/docker/impl/request_builder.ex rename to docker_engine_api/request_builder.ex diff --git a/mix.exs b/mix.exs index f139413..fc0b5c6 100644 --- a/mix.exs +++ b/mix.exs @@ -32,8 +32,8 @@ defmodule TestcontainersElixir.MixProject do ] end - defp elixirc_paths(:test), do: ["lib", "test/support"] - defp elixirc_paths(_), do: ["lib"] + defp elixirc_paths(:test), do: ["lib", "docker_engine_api", "test/support"] + defp elixirc_paths(_), do: ["lib", "docker_engine_api"] # Configuration for the OTP application. # From b8e05e280fee2ba6db42d0dffb815c29a2b9821f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Sun, 3 Nov 2024 21:53:56 +0100 Subject: [PATCH 3/4] ignore docker engine api in coverage --- mix.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index fc0b5c6..608adba 100644 --- a/mix.exs +++ b/mix.exs @@ -25,7 +25,8 @@ defmodule TestcontainersElixir.MixProject do summary: [threshold: 60], ignore_modules: [ TestHelper, - Inspect.Testcontainers.TestUser + Inspect.Testcontainers.TestUser, + DockerEngineAPI ] ], elixirc_paths: elixirc_paths(Mix.env()) From e49952abe3e780d86a8f1a4c533da4692561fe51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Sun, 3 Nov 2024 22:24:22 +0100 Subject: [PATCH 4/4] ignore DockerEngineAPI in cover --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 608adba..15a4a92 100644 --- a/mix.exs +++ b/mix.exs @@ -26,7 +26,7 @@ defmodule TestcontainersElixir.MixProject do ignore_modules: [ TestHelper, Inspect.Testcontainers.TestUser, - DockerEngineAPI + ~r/DockerEngineAPI/ ] ], elixirc_paths: elixirc_paths(Mix.env())