@zlayer/api-client 0.10.86 → 0.10.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +58 -1
- package/README.md +48 -6
- package/dist/apis/AuthenticationApi.d.ts +43 -1
- package/dist/apis/AuthenticationApi.js +112 -0
- package/dist/apis/ContainerNetworksApi.d.ts +123 -0
- package/dist/apis/ContainerNetworksApi.js +331 -0
- package/dist/apis/ContainersApi.d.ts +7 -4
- package/dist/apis/ContainersApi.js +13 -4
- package/dist/apis/EventsApi.d.ts +35 -0
- package/dist/apis/EventsApi.js +81 -0
- package/dist/apis/PermissionsApi.d.ts +18 -0
- package/dist/apis/PermissionsApi.js +46 -0
- package/dist/apis/SecretsApi.d.ts +38 -1
- package/dist/apis/SecretsApi.js +109 -0
- package/dist/apis/VolumesApi.d.ts +41 -7
- package/dist/apis/VolumesApi.js +102 -5
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/models/BridgeNetwork.d.ts +72 -0
- package/dist/models/BridgeNetwork.js +67 -0
- package/dist/models/BridgeNetworkAttachment.d.ts +50 -0
- package/dist/models/BridgeNetworkAttachment.js +56 -0
- package/dist/models/BridgeNetworkDetails.d.ts +79 -0
- package/dist/models/BridgeNetworkDetails.js +72 -0
- package/dist/models/BridgeNetworkDriver.d.ts +25 -0
- package/dist/models/BridgeNetworkDriver.js +51 -0
- package/dist/models/ConnectBridgeNetworkRequest.d.ts +45 -0
- package/dist/models/ConnectBridgeNetworkRequest.js +54 -0
- package/dist/models/ContainerEvent.d.ts +82 -0
- package/dist/models/ContainerEvent.js +67 -0
- package/dist/models/ContainerEventKind.d.ts +27 -0
- package/dist/models/ContainerEventKind.js +53 -0
- package/dist/models/ContainerHealthInfo.d.ts +53 -0
- package/dist/models/ContainerHealthInfo.js +54 -0
- package/dist/models/ContainerInfo.d.ts +40 -0
- package/dist/models/ContainerInfo.js +13 -0
- package/dist/models/ContainerRestartKind.d.ts +27 -0
- package/dist/models/ContainerRestartKind.js +53 -0
- package/dist/models/ContainerRestartPolicy.d.ts +53 -0
- package/dist/models/ContainerRestartPolicy.js +55 -0
- package/dist/models/ContainerWaitResponse.d.ts +30 -2
- package/dist/models/ContainerWaitResponse.js +6 -0
- package/dist/models/CreateBridgeNetworkRequest.d.ts +60 -0
- package/dist/models/CreateBridgeNetworkRequest.js +59 -0
- package/dist/models/CreateContainerRequest.d.ts +77 -0
- package/dist/models/CreateContainerRequest.js +23 -0
- package/dist/models/CreateVolumeRequest.d.ts +54 -0
- package/dist/models/CreateVolumeRequest.js +56 -0
- package/dist/models/DisconnectBridgeNetworkRequest.d.ts +38 -0
- package/dist/models/DisconnectBridgeNetworkRequest.js +52 -0
- package/dist/models/HealthCheckRequest.d.ts +94 -0
- package/dist/models/HealthCheckRequest.js +66 -0
- package/dist/models/NetworkAttachmentInfo.d.ts +49 -0
- package/dist/models/NetworkAttachmentInfo.js +54 -0
- package/dist/models/NetworkAttachmentRequest.d.ts +51 -0
- package/dist/models/NetworkAttachmentRequest.js +54 -0
- package/dist/models/OidcCallbackResponse.d.ts +47 -0
- package/dist/models/OidcCallbackResponse.js +59 -0
- package/dist/models/OidcProviderPublic.d.ts +39 -0
- package/dist/models/OidcProviderPublic.js +54 -0
- package/dist/models/PortMapping.d.ts +55 -0
- package/dist/models/PortMapping.js +57 -0
- package/dist/models/PortProtocol.d.ts +25 -0
- package/dist/models/PortProtocol.js +51 -0
- package/dist/models/PullImageRequest.d.ts +18 -0
- package/dist/models/PullImageRequest.js +5 -0
- package/dist/models/RegistryAuth.d.ts +52 -0
- package/dist/models/RegistryAuth.js +57 -0
- package/dist/models/RegistryAuthType.d.ts +25 -0
- package/dist/models/RegistryAuthType.js +51 -0
- package/dist/models/RevealAllSecretsResponse.d.ts +41 -0
- package/dist/models/RevealAllSecretsResponse.js +54 -0
- package/dist/models/RotateSecretRequest.d.ts +32 -0
- package/dist/models/RotateSecretRequest.js +50 -0
- package/dist/models/RotateSecretResponse.d.ts +46 -0
- package/dist/models/RotateSecretResponse.js +56 -0
- package/dist/models/VolumeInfo.d.ts +70 -0
- package/dist/models/VolumeInfo.js +64 -0
- package/dist/models/VolumeMount.d.ts +16 -3
- package/dist/models/VolumeMount.js +4 -3
- package/dist/models/VolumeMountType.d.ts +30 -0
- package/dist/models/VolumeMountType.js +56 -0
- package/dist/models/VolumeSummary.d.ts +7 -4
- package/dist/models/index.d.ts +27 -0
- package/dist/models/index.js +27 -0
- package/docs/AddMemberRequest.md +1 -1
- package/docs/AuditApi.md +3 -3
- package/docs/AuditEntry.md +1 -1
- package/docs/AuthenticationApi.md +212 -18
- package/docs/BackendGroupInfo.md +1 -1
- package/docs/BackendInfo.md +1 -1
- package/docs/BackendsResponse.md +1 -1
- package/docs/BootstrapRequest.md +1 -1
- package/docs/BridgeNetwork.md +47 -0
- package/docs/BridgeNetworkAttachment.md +41 -0
- package/docs/BridgeNetworkDetails.md +49 -0
- package/docs/BridgeNetworkDriver.md +33 -0
- package/docs/BuildApi.md +21 -21
- package/docs/BuildKind.md +1 -1
- package/docs/BuildRequest.md +1 -1
- package/docs/BuildRequestWithContext.md +1 -1
- package/docs/BuildStateEnum.md +1 -1
- package/docs/BuildStatus.md +1 -1
- package/docs/BulkImportResponse.md +1 -1
- package/docs/CertInfo.md +1 -1
- package/docs/ClusterApi.md +12 -12
- package/docs/ClusterJoinRequest.md +1 -1
- package/docs/ClusterJoinResponse.md +1 -1
- package/docs/ClusterNodeSummary.md +1 -1
- package/docs/ClusterPeer.md +1 -1
- package/docs/ConnectBridgeNetworkRequest.md +39 -0
- package/docs/ContainerEvent.md +47 -0
- package/docs/ContainerEventKind.md +33 -0
- package/docs/ContainerExecRequest.md +1 -1
- package/docs/ContainerExecResponse.md +1 -1
- package/docs/ContainerHealthInfo.md +39 -0
- package/docs/ContainerInfo.md +11 -1
- package/docs/ContainerNetworksApi.md +466 -0
- package/docs/ContainerResourceLimits.md +1 -1
- package/docs/ContainerRestartKind.md +33 -0
- package/docs/ContainerRestartPolicy.md +39 -0
- package/docs/ContainerStatsResponse.md +1 -1
- package/docs/ContainerWaitResponse.md +8 -2
- package/docs/ContainersApi.md +51 -42
- package/docs/CreateBridgeNetworkRequest.md +43 -0
- package/docs/CreateContainerRequest.md +19 -1
- package/docs/CreateDeploymentRequest.md +1 -1
- package/docs/CreateEnvironmentRequest.md +1 -1
- package/docs/CreateGitCredentialRequest.md +1 -1
- package/docs/CreateGroupRequest.md +1 -1
- package/docs/CreateNodeTunnelRequest.md +1 -1
- package/docs/CreateNodeTunnelResponse.md +1 -1
- package/docs/CreateNotifierRequest.md +1 -1
- package/docs/CreateProjectRequest.md +1 -1
- package/docs/CreateRegistryCredentialRequest.md +1 -1
- package/docs/CreateSecretRequest.md +1 -1
- package/docs/CreateSyncRequest.md +1 -1
- package/docs/CreateTaskRequest.md +1 -1
- package/docs/CreateTunnelRequest.md +1 -1
- package/docs/CreateTunnelResponse.md +1 -1
- package/docs/CreateUserRequest.md +1 -1
- package/docs/CreateVariableRequest.md +1 -1
- package/docs/CreateVolumeRequest.md +41 -0
- package/docs/CreateWorkflowRequest.md +1 -1
- package/docs/CredentialsApi.md +18 -18
- package/docs/CronApi.md +15 -15
- package/docs/CronJobResponse.md +1 -1
- package/docs/CronStatusResponse.md +1 -1
- package/docs/CsrfResponse.md +1 -1
- package/docs/DeploymentDetails.md +1 -1
- package/docs/DeploymentSummary.md +1 -1
- package/docs/DeploymentsApi.md +12 -12
- package/docs/DisconnectBridgeNetworkRequest.md +37 -0
- package/docs/DnsStatusResponse.md +1 -1
- package/docs/EnvironmentsApi.md +15 -15
- package/docs/EventsApi.md +85 -0
- package/docs/ForceLeaderRequest.md +1 -1
- package/docs/ForceLeaderResponse.md +1 -1
- package/docs/GitCredentialKindSchema.md +1 -1
- package/docs/GitCredentialResponse.md +1 -1
- package/docs/GpuInfoSummary.md +1 -1
- package/docs/GpuUtilizationReport.md +1 -1
- package/docs/GrantPermissionRequest.md +1 -1
- package/docs/GroupMembersResponse.md +1 -1
- package/docs/GroupsApi.md +21 -21
- package/docs/HealthApi.md +6 -6
- package/docs/HealthCheckRequest.md +51 -0
- package/docs/HealthResponse.md +1 -1
- package/docs/HeartbeatRequest.md +1 -1
- package/docs/ImageInfoDto.md +1 -1
- package/docs/ImagesApi.md +15 -15
- package/docs/InternalApi.md +6 -6
- package/docs/InternalScaleRequest.md +1 -1
- package/docs/InternalScaleResponse.md +1 -1
- package/docs/IpAllocationResponse.md +1 -1
- package/docs/JobExecutionResponse.md +1 -1
- package/docs/JobsApi.md +12 -12
- package/docs/JoinTokenResponse.md +1 -1
- package/docs/KillContainerRequest.md +1 -1
- package/docs/LinkDeploymentRequest.md +1 -1
- package/docs/LoginRequest.md +1 -1
- package/docs/LoginResponse.md +1 -1
- package/docs/NetworkAttachmentInfo.md +39 -0
- package/docs/NetworkAttachmentRequest.md +39 -0
- package/docs/NetworkSummary.md +1 -1
- package/docs/NetworksApi.md +15 -15
- package/docs/NodeDetails.md +1 -1
- package/docs/NodeResourceInfo.md +1 -1
- package/docs/NodeSummary.md +1 -1
- package/docs/NodesApi.md +12 -12
- package/docs/NotifierConfig.md +1 -1
- package/docs/NotifierConfigOneOf.md +1 -1
- package/docs/NotifierConfigOneOf1.md +1 -1
- package/docs/NotifierConfigOneOf2.md +1 -1
- package/docs/NotifierConfigOneOf3.md +1 -1
- package/docs/NotifierKind.md +1 -1
- package/docs/NotifiersApi.md +18 -18
- package/docs/OidcCallbackResponse.md +39 -0
- package/docs/OidcProviderPublic.md +37 -0
- package/docs/OverlayApi.md +12 -12
- package/docs/OverlayStatusResponse.md +1 -1
- package/docs/PeerInfo.md +1 -1
- package/docs/PeerListResponse.md +1 -1
- package/docs/PermissionLevel.md +1 -1
- package/docs/PermissionsApi.md +80 -9
- package/docs/PortMapping.md +41 -0
- package/docs/PortProtocol.md +33 -0
- package/docs/ProjectPullResponse.md +1 -1
- package/docs/ProjectsApi.md +27 -27
- package/docs/ProxyApi.md +12 -12
- package/docs/PruneResultDto.md +1 -1
- package/docs/PullImageRequest.md +5 -1
- package/docs/PullImageResponse.md +1 -1
- package/docs/RegisteredServiceInfo.md +1 -1
- package/docs/RegistryAuth.md +39 -0
- package/docs/RegistryAuthType.md +33 -0
- package/docs/RegistryAuthTypeSchema.md +1 -1
- package/docs/RegistryCredentialResponse.md +1 -1
- package/docs/ReplicationInfo.md +1 -1
- package/docs/RestartContainerRequest.md +1 -1
- package/docs/RevealAllSecretsResponse.md +37 -0
- package/docs/RotateSecretRequest.md +35 -0
- package/docs/RotateSecretResponse.md +39 -0
- package/docs/RouteInfo.md +1 -1
- package/docs/RoutesResponse.md +1 -1
- package/docs/ScaleRequest.md +1 -1
- package/docs/SecretMetadataResponse.md +1 -1
- package/docs/SecretsApi.md +175 -15
- package/docs/ServiceDetails.md +1 -1
- package/docs/ServiceEndpoint.md +1 -1
- package/docs/ServiceHealthInfo.md +1 -1
- package/docs/ServiceMetrics.md +1 -1
- package/docs/ServiceSummary.md +1 -1
- package/docs/ServicesApi.md +12 -12
- package/docs/SetPasswordRequest.md +1 -1
- package/docs/StepResult.md +1 -1
- package/docs/StopContainerRequest.md +1 -1
- package/docs/StorageApi.md +3 -3
- package/docs/StorageStatusResponse.md +1 -1
- package/docs/StoredEnvironment.md +1 -1
- package/docs/StoredNotifier.md +1 -1
- package/docs/StoredPermission.md +1 -1
- package/docs/StoredProject.md +1 -1
- package/docs/StoredSync.md +1 -1
- package/docs/StoredTask.md +1 -1
- package/docs/StoredUserGroup.md +1 -1
- package/docs/StoredVariable.md +1 -1
- package/docs/StoredWorkflow.md +1 -1
- package/docs/StreamBackendInfo.md +1 -1
- package/docs/StreamInfo.md +1 -1
- package/docs/StreamsResponse.md +1 -1
- package/docs/SubjectKind.md +1 -1
- package/docs/SuccessResponse.md +1 -1
- package/docs/SyncApplyResponse.md +1 -1
- package/docs/SyncDiffResponse.md +1 -1
- package/docs/SyncResourceResponse.md +1 -1
- package/docs/SyncResourceResult.md +1 -1
- package/docs/SyncsApi.md +15 -15
- package/docs/TagImageRequest.md +1 -1
- package/docs/TaskKind.md +1 -1
- package/docs/TaskRun.md +1 -1
- package/docs/TasksApi.md +18 -18
- package/docs/TemplateInfo.md +1 -1
- package/docs/TestNotifierResponse.md +1 -1
- package/docs/TlsResponse.md +1 -1
- package/docs/TokenRequest.md +1 -1
- package/docs/TokenResponse.md +1 -1
- package/docs/TriggerBuildResponse.md +1 -1
- package/docs/TriggerCronResponse.md +1 -1
- package/docs/TriggerJobResponse.md +1 -1
- package/docs/TunnelStatus.md +1 -1
- package/docs/TunnelSummary.md +1 -1
- package/docs/TunnelsApi.md +18 -18
- package/docs/UpdateEnvironmentRequest.md +1 -1
- package/docs/UpdateGroupRequest.md +1 -1
- package/docs/UpdateLabelsRequest.md +1 -1
- package/docs/UpdateLabelsResponse.md +1 -1
- package/docs/UpdateNotifierRequest.md +1 -1
- package/docs/UpdateProjectRequest.md +1 -1
- package/docs/UpdateUserRequest.md +1 -1
- package/docs/UpdateVariableRequest.md +1 -1
- package/docs/UserRole.md +1 -1
- package/docs/UserView.md +1 -1
- package/docs/UsersApi.md +18 -18
- package/docs/VariablesApi.md +15 -15
- package/docs/VolumeInfo.md +45 -0
- package/docs/VolumeMount.md +4 -2
- package/docs/VolumeMountType.md +33 -0
- package/docs/VolumeSummary.md +2 -2
- package/docs/VolumesApi.md +163 -13
- package/docs/WebhookInfoResponse.md +1 -1
- package/docs/WebhookResponse.md +1 -1
- package/docs/WebhooksApi.md +9 -9
- package/docs/WorkflowAction.md +1 -1
- package/docs/WorkflowActionOneOf.md +1 -1
- package/docs/WorkflowActionOneOf1.md +1 -1
- package/docs/WorkflowActionOneOf2.md +1 -1
- package/docs/WorkflowActionOneOf3.md +1 -1
- package/docs/WorkflowRun.md +1 -1
- package/docs/WorkflowRunStatus.md +1 -1
- package/docs/WorkflowStep.md +1 -1
- package/docs/WorkflowsApi.md +18 -18
- package/package.json +1 -1
- package/src/apis/AuthenticationApi.ts +140 -0
- package/src/apis/ContainerNetworksApi.ts +418 -0
- package/src/apis/ContainersApi.ts +19 -4
- package/src/apis/EventsApi.ts +82 -0
- package/src/apis/PermissionsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +151 -0
- package/src/apis/VolumesApi.ts +133 -10
- package/src/apis/index.ts +2 -0
- package/src/models/BridgeNetwork.ts +127 -0
- package/src/models/BridgeNetworkAttachment.ts +90 -0
- package/src/models/BridgeNetworkDetails.ts +143 -0
- package/src/models/BridgeNetworkDriver.ts +53 -0
- package/src/models/ConnectBridgeNetworkRequest.ts +83 -0
- package/src/models/ContainerEvent.ts +137 -0
- package/src/models/ContainerEventKind.ts +55 -0
- package/src/models/ContainerHealthInfo.ts +91 -0
- package/src/models/ContainerInfo.ts +69 -0
- package/src/models/ContainerRestartKind.ts +55 -0
- package/src/models/ContainerRestartPolicy.ts +100 -0
- package/src/models/ContainerWaitResponse.ts +36 -2
- package/src/models/CreateBridgeNetworkRequest.ts +109 -0
- package/src/models/CreateContainerRequest.ts +125 -0
- package/src/models/CreateVolumeRequest.ts +92 -0
- package/src/models/DisconnectBridgeNetworkRequest.ts +74 -0
- package/src/models/HealthCheckRequest.ts +144 -0
- package/src/models/NetworkAttachmentInfo.ts +87 -0
- package/src/models/NetworkAttachmentRequest.ts +89 -0
- package/src/models/OidcCallbackResponse.ts +94 -0
- package/src/models/OidcProviderPublic.ts +76 -0
- package/src/models/PortMapping.ts +104 -0
- package/src/models/PortProtocol.ts +53 -0
- package/src/models/PullImageRequest.ts +29 -0
- package/src/models/RegistryAuth.ts +100 -0
- package/src/models/RegistryAuthType.ts +53 -0
- package/src/models/RevealAllSecretsResponse.ts +76 -0
- package/src/models/RotateSecretRequest.ts +66 -0
- package/src/models/RotateSecretResponse.ts +85 -0
- package/src/models/VolumeInfo.ts +114 -0
- package/src/models/VolumeMount.ts +28 -5
- package/src/models/VolumeMountType.ts +58 -0
- package/src/models/VolumeSummary.ts +7 -4
- package/src/models/index.ts +27 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Body for `POST /api/v1/container-networks/{id_or_name}/disconnect`.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DisconnectBridgeNetworkRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface DisconnectBridgeNetworkRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Container id to detach.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DisconnectBridgeNetworkRequest
|
|
26
|
+
*/
|
|
27
|
+
containerId: string;
|
|
28
|
+
/**
|
|
29
|
+
* If true, the runtime is asked to forcibly detach.
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof DisconnectBridgeNetworkRequest
|
|
32
|
+
*/
|
|
33
|
+
force?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the DisconnectBridgeNetworkRequest interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfDisconnectBridgeNetworkRequest(value: object): value is DisconnectBridgeNetworkRequest {
|
|
40
|
+
if (!('containerId' in value) || value['containerId'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function DisconnectBridgeNetworkRequestFromJSON(json: any): DisconnectBridgeNetworkRequest {
|
|
45
|
+
return DisconnectBridgeNetworkRequestFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function DisconnectBridgeNetworkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DisconnectBridgeNetworkRequest {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'containerId': json['container_id'],
|
|
55
|
+
'force': json['force'] == null ? undefined : json['force'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function DisconnectBridgeNetworkRequestToJSON(json: any): DisconnectBridgeNetworkRequest {
|
|
60
|
+
return DisconnectBridgeNetworkRequestToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function DisconnectBridgeNetworkRequestToJSONTyped(value?: DisconnectBridgeNetworkRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'container_id': value['containerId'],
|
|
71
|
+
'force': value['force'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Container health check request.
|
|
18
|
+
*
|
|
19
|
+
* Mirrors the on-disk `HealthCheck` enum (see `zlayer_spec::HealthCheck`) as a
|
|
20
|
+
* discriminated union keyed on `type`. Translated to `zlayer_spec::HealthSpec`
|
|
21
|
+
* by `HealthCheckRequest::to_health_spec`. Durations are humantime strings
|
|
22
|
+
* (for example `"10s"`, `"500ms"`, `"1m"`).
|
|
23
|
+
*
|
|
24
|
+
* ## Variants
|
|
25
|
+
* - `type: "tcp"` — requires `port` (1-65535).
|
|
26
|
+
* - `type: "http"` — requires `url`; `expect_status` defaults to 200.
|
|
27
|
+
* - `type: "command"` — requires `command` (array of argv tokens; joined with
|
|
28
|
+
* spaces and passed to `sh -c` by the health monitor, matching the existing
|
|
29
|
+
* compose-to-ZLayer conversion in `zlayer-docker`).
|
|
30
|
+
* @export
|
|
31
|
+
* @interface HealthCheckRequest
|
|
32
|
+
*/
|
|
33
|
+
export interface HealthCheckRequest {
|
|
34
|
+
/**
|
|
35
|
+
* Command argv (required when `type == "command"`). Joined with spaces
|
|
36
|
+
* and passed to `sh -c`.
|
|
37
|
+
* @type {Array<string>}
|
|
38
|
+
* @memberof HealthCheckRequest
|
|
39
|
+
*/
|
|
40
|
+
command?: Array<string> | null;
|
|
41
|
+
/**
|
|
42
|
+
* HTTP status code expected from `url` (defaults to 200).
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof HealthCheckRequest
|
|
45
|
+
*/
|
|
46
|
+
expectStatus?: number | null;
|
|
47
|
+
/**
|
|
48
|
+
* Interval between checks, humantime format (e.g. `"30s"`). Defaults to 30s.
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof HealthCheckRequest
|
|
51
|
+
*/
|
|
52
|
+
interval?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* TCP port (required when `type == "tcp"`).
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof HealthCheckRequest
|
|
57
|
+
*/
|
|
58
|
+
port?: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* Number of consecutive failures before marking unhealthy. Defaults to 3.
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof HealthCheckRequest
|
|
63
|
+
*/
|
|
64
|
+
retries?: number | null;
|
|
65
|
+
/**
|
|
66
|
+
* Grace period before the first check runs, humantime format. Maps to
|
|
67
|
+
* `HealthSpec::start_grace`.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof HealthCheckRequest
|
|
70
|
+
*/
|
|
71
|
+
startPeriod?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Timeout per individual check, humantime format.
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof HealthCheckRequest
|
|
76
|
+
*/
|
|
77
|
+
timeout?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Check variant: `"tcp"`, `"http"`, or `"command"`.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof HealthCheckRequest
|
|
82
|
+
*/
|
|
83
|
+
type: string;
|
|
84
|
+
/**
|
|
85
|
+
* HTTP URL (required when `type == "http"`).
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof HealthCheckRequest
|
|
88
|
+
*/
|
|
89
|
+
url?: string | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Check if a given object implements the HealthCheckRequest interface.
|
|
94
|
+
*/
|
|
95
|
+
export function instanceOfHealthCheckRequest(value: object): value is HealthCheckRequest {
|
|
96
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function HealthCheckRequestFromJSON(json: any): HealthCheckRequest {
|
|
101
|
+
return HealthCheckRequestFromJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function HealthCheckRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthCheckRequest {
|
|
105
|
+
if (json == null) {
|
|
106
|
+
return json;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'command': json['command'] == null ? undefined : json['command'],
|
|
111
|
+
'expectStatus': json['expect_status'] == null ? undefined : json['expect_status'],
|
|
112
|
+
'interval': json['interval'] == null ? undefined : json['interval'],
|
|
113
|
+
'port': json['port'] == null ? undefined : json['port'],
|
|
114
|
+
'retries': json['retries'] == null ? undefined : json['retries'],
|
|
115
|
+
'startPeriod': json['start_period'] == null ? undefined : json['start_period'],
|
|
116
|
+
'timeout': json['timeout'] == null ? undefined : json['timeout'],
|
|
117
|
+
'type': json['type'],
|
|
118
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function HealthCheckRequestToJSON(json: any): HealthCheckRequest {
|
|
123
|
+
return HealthCheckRequestToJSONTyped(json, false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function HealthCheckRequestToJSONTyped(value?: HealthCheckRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
127
|
+
if (value == null) {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
|
|
133
|
+
'command': value['command'],
|
|
134
|
+
'expect_status': value['expectStatus'],
|
|
135
|
+
'interval': value['interval'],
|
|
136
|
+
'port': value['port'],
|
|
137
|
+
'retries': value['retries'],
|
|
138
|
+
'start_period': value['startPeriod'],
|
|
139
|
+
'timeout': value['timeout'],
|
|
140
|
+
'type': value['type'],
|
|
141
|
+
'url': value['url'],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Per-network attachment entry on [`ContainerInfo::networks`].
|
|
18
|
+
*
|
|
19
|
+
* Populated from the runtime's inspect response — mirrors the subset of
|
|
20
|
+
* bollard's `EndpointSettings` that API clients need to correlate a container
|
|
21
|
+
* with its `container_networks` entries.
|
|
22
|
+
* @export
|
|
23
|
+
* @interface NetworkAttachmentInfo
|
|
24
|
+
*/
|
|
25
|
+
export interface NetworkAttachmentInfo {
|
|
26
|
+
/**
|
|
27
|
+
* DNS aliases the container answers to on this network.
|
|
28
|
+
* @type {Array<string>}
|
|
29
|
+
* @memberof NetworkAttachmentInfo
|
|
30
|
+
*/
|
|
31
|
+
aliases?: Array<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Assigned IPv4 on this network, if any.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof NetworkAttachmentInfo
|
|
36
|
+
*/
|
|
37
|
+
ipv4?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Network name as reported by the runtime. Matches the `name` field on
|
|
40
|
+
* entries returned by `GET /api/v1/container-networks`.
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof NetworkAttachmentInfo
|
|
43
|
+
*/
|
|
44
|
+
network: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the NetworkAttachmentInfo interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfNetworkAttachmentInfo(value: object): value is NetworkAttachmentInfo {
|
|
51
|
+
if (!('network' in value) || value['network'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function NetworkAttachmentInfoFromJSON(json: any): NetworkAttachmentInfo {
|
|
56
|
+
return NetworkAttachmentInfoFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function NetworkAttachmentInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkAttachmentInfo {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
66
|
+
'ipv4': json['ipv4'] == null ? undefined : json['ipv4'],
|
|
67
|
+
'network': json['network'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function NetworkAttachmentInfoToJSON(json: any): NetworkAttachmentInfo {
|
|
72
|
+
return NetworkAttachmentInfoToJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function NetworkAttachmentInfoToJSONTyped(value?: NetworkAttachmentInfo | null, ignoreDiscriminator: boolean = false): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'aliases': value['aliases'],
|
|
83
|
+
'ipv4': value['ipv4'],
|
|
84
|
+
'network': value['network'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* A request to attach a freshly-created container to a user-defined bridge
|
|
18
|
+
* or overlay network, mirroring the wire-shape used by `POST
|
|
19
|
+
* /api/v1/container-networks/{id_or_name}/connect`.
|
|
20
|
+
*
|
|
21
|
+
* Included on [`CreateContainerRequest::networks`] so callers can wire up
|
|
22
|
+
* every attachment in a single call instead of issuing a separate connect
|
|
23
|
+
* request per network after container create.
|
|
24
|
+
* @export
|
|
25
|
+
* @interface NetworkAttachmentRequest
|
|
26
|
+
*/
|
|
27
|
+
export interface NetworkAttachmentRequest {
|
|
28
|
+
/**
|
|
29
|
+
* Optional DNS aliases for this container on the network.
|
|
30
|
+
* @type {Array<string>}
|
|
31
|
+
* @memberof NetworkAttachmentRequest
|
|
32
|
+
*/
|
|
33
|
+
aliases?: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Optional static IPv4 to pin this container to. Validated as
|
|
36
|
+
* [`std::net::Ipv4Addr`] before the runtime is called.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof NetworkAttachmentRequest
|
|
39
|
+
*/
|
|
40
|
+
ipv4Address?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Bridge-network id or name to attach to.
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof NetworkAttachmentRequest
|
|
45
|
+
*/
|
|
46
|
+
network: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the NetworkAttachmentRequest interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfNetworkAttachmentRequest(value: object): value is NetworkAttachmentRequest {
|
|
53
|
+
if (!('network' in value) || value['network'] === undefined) return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function NetworkAttachmentRequestFromJSON(json: any): NetworkAttachmentRequest {
|
|
58
|
+
return NetworkAttachmentRequestFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function NetworkAttachmentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkAttachmentRequest {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
68
|
+
'ipv4Address': json['ipv4_address'] == null ? undefined : json['ipv4_address'],
|
|
69
|
+
'network': json['network'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function NetworkAttachmentRequestToJSON(json: any): NetworkAttachmentRequest {
|
|
74
|
+
return NetworkAttachmentRequestToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function NetworkAttachmentRequestToJSONTyped(value?: NetworkAttachmentRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'aliases': value['aliases'],
|
|
85
|
+
'ipv4_address': value['ipv4Address'],
|
|
86
|
+
'network': value['network'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UserView } from './UserView';
|
|
17
|
+
import {
|
|
18
|
+
UserViewFromJSON,
|
|
19
|
+
UserViewFromJSONTyped,
|
|
20
|
+
UserViewToJSON,
|
|
21
|
+
UserViewToJSONTyped,
|
|
22
|
+
} from './UserView';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Callback response body (returned as JSON unless the operator prefers a
|
|
26
|
+
* redirect; initial integration keeps JSON so the Manager UI can show a
|
|
27
|
+
* welcome screen post-exchange).
|
|
28
|
+
* @export
|
|
29
|
+
* @interface OidcCallbackResponse
|
|
30
|
+
*/
|
|
31
|
+
export interface OidcCallbackResponse {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof OidcCallbackResponse
|
|
36
|
+
*/
|
|
37
|
+
csrfToken: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof OidcCallbackResponse
|
|
42
|
+
*/
|
|
43
|
+
provider: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {UserView}
|
|
47
|
+
* @memberof OidcCallbackResponse
|
|
48
|
+
*/
|
|
49
|
+
user: UserView;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the OidcCallbackResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfOidcCallbackResponse(value: object): value is OidcCallbackResponse {
|
|
56
|
+
if (!('csrfToken' in value) || value['csrfToken'] === undefined) return false;
|
|
57
|
+
if (!('provider' in value) || value['provider'] === undefined) return false;
|
|
58
|
+
if (!('user' in value) || value['user'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function OidcCallbackResponseFromJSON(json: any): OidcCallbackResponse {
|
|
63
|
+
return OidcCallbackResponseFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function OidcCallbackResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OidcCallbackResponse {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'csrfToken': json['csrf_token'],
|
|
73
|
+
'provider': json['provider'],
|
|
74
|
+
'user': UserViewFromJSON(json['user']),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function OidcCallbackResponseToJSON(json: any): OidcCallbackResponse {
|
|
79
|
+
return OidcCallbackResponseToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function OidcCallbackResponseToJSONTyped(value?: OidcCallbackResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'csrf_token': value['csrfToken'],
|
|
90
|
+
'provider': value['provider'],
|
|
91
|
+
'user': UserViewToJSON(value['user']),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Public-facing projection — what the Manager UI needs to render a login
|
|
18
|
+
* button. Never includes the client secret.
|
|
19
|
+
* @export
|
|
20
|
+
* @interface OidcProviderPublic
|
|
21
|
+
*/
|
|
22
|
+
export interface OidcProviderPublic {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof OidcProviderPublic
|
|
27
|
+
*/
|
|
28
|
+
displayName: string;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof OidcProviderPublic
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the OidcProviderPublic interface.
|
|
39
|
+
*/
|
|
40
|
+
export function instanceOfOidcProviderPublic(value: object): value is OidcProviderPublic {
|
|
41
|
+
if (!('displayName' in value) || value['displayName'] === undefined) return false;
|
|
42
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function OidcProviderPublicFromJSON(json: any): OidcProviderPublic {
|
|
47
|
+
return OidcProviderPublicFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function OidcProviderPublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): OidcProviderPublic {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'displayName': json['display_name'],
|
|
57
|
+
'name': json['name'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function OidcProviderPublicToJSON(json: any): OidcProviderPublic {
|
|
62
|
+
return OidcProviderPublicToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function OidcProviderPublicToJSONTyped(value?: OidcProviderPublic | null, ignoreDiscriminator: boolean = false): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'display_name': value['displayName'],
|
|
73
|
+
'name': value['name'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PortProtocol } from './PortProtocol';
|
|
17
|
+
import {
|
|
18
|
+
PortProtocolFromJSON,
|
|
19
|
+
PortProtocolFromJSONTyped,
|
|
20
|
+
PortProtocolToJSON,
|
|
21
|
+
PortProtocolToJSONTyped,
|
|
22
|
+
} from './PortProtocol';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A single host-to-container port publish rule (Docker's `-p`).
|
|
26
|
+
*
|
|
27
|
+
* When `host_port` is `None` (or explicitly `Some(0)`), the container runtime
|
|
28
|
+
* assigns an ephemeral host port. `host_ip` defaults to `"0.0.0.0"` to bind
|
|
29
|
+
* on all interfaces.
|
|
30
|
+
* @export
|
|
31
|
+
* @interface PortMapping
|
|
32
|
+
*/
|
|
33
|
+
export interface PortMapping {
|
|
34
|
+
/**
|
|
35
|
+
* Container-side port.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PortMapping
|
|
38
|
+
*/
|
|
39
|
+
containerPort: number;
|
|
40
|
+
/**
|
|
41
|
+
* Host interface to bind on. Defaults to `"0.0.0.0"` (all interfaces).
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PortMapping
|
|
44
|
+
*/
|
|
45
|
+
hostIp?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Host port. `None` (or zero) means "assign an ephemeral port".
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PortMapping
|
|
50
|
+
*/
|
|
51
|
+
hostPort?: number | null;
|
|
52
|
+
/**
|
|
53
|
+
* Transport protocol (defaults to TCP).
|
|
54
|
+
* @type {PortProtocol}
|
|
55
|
+
* @memberof PortMapping
|
|
56
|
+
*/
|
|
57
|
+
protocol?: PortProtocol;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the PortMapping interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfPortMapping(value: object): value is PortMapping {
|
|
66
|
+
if (!('containerPort' in value) || value['containerPort'] === undefined) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PortMappingFromJSON(json: any): PortMapping {
|
|
71
|
+
return PortMappingFromJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function PortMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortMapping {
|
|
75
|
+
if (json == null) {
|
|
76
|
+
return json;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'containerPort': json['container_port'],
|
|
81
|
+
'hostIp': json['host_ip'] == null ? undefined : json['host_ip'],
|
|
82
|
+
'hostPort': json['host_port'] == null ? undefined : json['host_port'],
|
|
83
|
+
'protocol': json['protocol'] == null ? undefined : PortProtocolFromJSON(json['protocol']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function PortMappingToJSON(json: any): PortMapping {
|
|
88
|
+
return PortMappingToJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function PortMappingToJSONTyped(value?: PortMapping | null, ignoreDiscriminator: boolean = false): any {
|
|
92
|
+
if (value == null) {
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'container_port': value['containerPort'],
|
|
99
|
+
'host_ip': value['hostIp'],
|
|
100
|
+
'host_port': value['hostPort'],
|
|
101
|
+
'protocol': PortProtocolToJSON(value['protocol']),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|